diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-12-03 13:29:22 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-12-03 13:29:22 +0100 |
commit | ca32f08966f1b51fcb19460f0996bb0c4048e6fe (patch) | |
tree | ec04cc15b867bc21eedca904cea9af0254531a11 /maintenance/populateLogSearch.php | |
parent | a22fbfc60f36f5f7ee10d5ae6fe347340c2ee67c (diff) |
Update to MediaWiki 1.18.0
* also update ArchLinux skin to chagnes in MonoBook
* Use only css to hide our menu bar when printing
Diffstat (limited to 'maintenance/populateLogSearch.php')
-rw-r--r-- | maintenance/populateLogSearch.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/maintenance/populateLogSearch.php b/maintenance/populateLogSearch.php index ce2d95cc..f13873cb 100644 --- a/maintenance/populateLogSearch.php +++ b/maintenance/populateLogSearch.php @@ -35,7 +35,7 @@ class PopulateLogSearch extends Maintenance { } public function execute() { - $db = wfGetDB( DB_MASTER ); + $db = $this->getDB( DB_MASTER ); if ( !$db->tableExists( 'log_search' ) ) { $this->error( "log_search does not exist", true ); } @@ -97,14 +97,14 @@ class PopulateLogSearch extends Maintenance { foreach ( $sres as $srow ) { if ( $srow->$userField > 0 ) $userIds[] = intval( $srow->$userField ); - else if ( $srow->$userTextField != '' ) + elseif ( $srow->$userTextField != '' ) $userIPs[] = $srow->$userTextField; } // 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 - } else if ( LogEventsList::typeAction( $row, $delTypes, 'event' ) ) { + } elseif ( LogEventsList::typeAction( $row, $delTypes, 'event' ) ) { $params = LogPage::extractParams( $row->log_params ); // Param format: <item CSV> [<ofield> <nfield>] if ( count( $params ) < 1 ) continue; // bad row @@ -121,7 +121,7 @@ class PopulateLogSearch extends Maintenance { foreach ( $sres as $srow ) { if ( $srow->log_user > 0 ) $userIds[] = intval( $srow->log_user ); - else if ( IP::isIPAddress( $srow->log_user_text ) ) + elseif ( IP::isIPAddress( $srow->log_user_text ) ) $userIPs[] = $srow->log_user_text; } $log->addRelations( 'target_author_id', $userIds, $row->log_id ); @@ -130,7 +130,7 @@ class PopulateLogSearch extends Maintenance { } $blockStart += self::LOG_SEARCH_BATCH_SIZE; $blockEnd += self::LOG_SEARCH_BATCH_SIZE; - wfWaitForSlaves( 5 ); + wfWaitForSlaves(); } if ( $db->insert( 'updatelog', |