diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:12:12 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:12:12 -0400 |
commit | c9aa36da061816dee256a979c2ff8d2ee41824d9 (patch) | |
tree | 29f7002b80ee984b488bd047dbbd80b36bf892e9 /maintenance/populateLogSearch.php | |
parent | b4274e0e33eafb5e9ead9d949ebf031a9fb8363b (diff) | |
parent | d1ba966140d7a60cd5ae4e8667ceb27c1a138592 (diff) |
Merge branch 'archwiki'
# Conflicts:
# skins/ArchLinux.php
# skins/ArchLinux/archlogo.gif
Diffstat (limited to 'maintenance/populateLogSearch.php')
-rw-r--r-- | maintenance/populateLogSearch.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/maintenance/populateLogSearch.php b/maintenance/populateLogSearch.php index d65635e5..4c1a72e8 100644 --- a/maintenance/populateLogSearch.php +++ b/maintenance/populateLogSearch.php @@ -31,7 +31,12 @@ require_once __DIR__ . '/Maintenance.php'; * @ingroup Maintenance */ class PopulateLogSearch extends LoggedUpdateMaintenance { - static $tableMap = array( 'rev' => 'revision', 'fa' => 'filearchive', 'oi' => 'oldimage', 'ar' => 'archive' ); + private static $tableMap = array( + 'rev' => 'revision', + 'fa' => 'filearchive', + 'oi' => 'oldimage', + 'ar' => 'archive' + ); public function __construct() { parent::__construct(); @@ -51,11 +56,13 @@ class PopulateLogSearch extends LoggedUpdateMaintenance { $db = $this->getDB( DB_MASTER ); if ( !$db->tableExists( 'log_search' ) ) { $this->error( "log_search does not exist" ); + return false; } $start = $db->selectField( 'logging', 'MIN(log_id)', false, __FUNCTION__ ); if ( !$start ) { $this->output( "Nothing to do.\n" ); + return true; } $end = $db->selectField( 'logging', 'MAX(log_id)', false, __FUNCTION__ ); @@ -121,8 +128,8 @@ class PopulateLogSearch extends LoggedUpdateMaintenance { // Add item author relations... $log->addRelations( 'target_author_id', $userIds, $row->log_id ); $log->addRelations( 'target_author_ip', $userIPs, $row->log_id ); - // RevisionDelete logs - log events } elseif ( LogEventsList::typeAction( $row, $delTypes, 'event' ) ) { + // RevisionDelete logs - log events $params = LogPage::extractParams( $row->log_params ); // Param format: <item CSV> [<ofield> <nfield>] if ( count( $params ) < 1 ) { @@ -154,6 +161,7 @@ class PopulateLogSearch extends LoggedUpdateMaintenance { wfWaitForSlaves(); } $this->output( "Done populating log_search table.\n" ); + return true; } } |