diff options
-rw-r--r-- | maintenance/deleteOldRevisions.php | 1 | ||||
-rw-r--r-- | maintenance/fixSlaveDesync.php | 4 | ||||
-rw-r--r-- | maintenance/language/StatOutputs.php | 1 | ||||
-rw-r--r-- | maintenance/nukePage.php | 1 | ||||
-rw-r--r-- | maintenance/purgeOldText.inc | 1 | ||||
-rw-r--r-- | maintenance/storage/checkStorage.php | 1 |
6 files changed, 7 insertions, 2 deletions
diff --git a/maintenance/deleteOldRevisions.php b/maintenance/deleteOldRevisions.php index ba76e9e9f847..2cb347fcb928 100644 --- a/maintenance/deleteOldRevisions.php +++ b/maintenance/deleteOldRevisions.php @@ -60,6 +60,7 @@ class DeleteOldRevisions extends Maintenance { # Get "active" revisions from the page table $this->output( "Searching for active revisions..." ); $res = $dbw->query( "SELECT page_latest FROM $tbl_pag{$pageIdClause}" ); + $cur = array(); foreach ( $res as $row ) { $cur[] = $row->page_latest; } diff --git a/maintenance/fixSlaveDesync.php b/maintenance/fixSlaveDesync.php index fe892944727c..3c6888aec3bf 100644 --- a/maintenance/fixSlaveDesync.php +++ b/maintenance/fixSlaveDesync.php @@ -124,7 +124,7 @@ class FixSlaveDesync extends Maintenance { $masterIDs[] = $row->rev_id; } - $res = $db->select( 'revision', array( 'rev_id' ), array( 'rev_page' => $pageID ), __METHOD__ ); + $res = $dbw->select( 'revision', array( 'rev_id' ), array( 'rev_page' => $pageID ), __METHOD__ ); $slaveIDs = array(); foreach ( $res as $row ) { $slaveIDs[] = $row->rev_id; @@ -133,7 +133,7 @@ class FixSlaveDesync extends Maintenance { $missingIDs = array_diff( $slaveIDs, $masterIDs ); if ( count( $missingIDs ) ) { $this->output( "Found " . count( $missingIDs ) . " lost in master, copying from slave... " ); - $dbFrom = $db; + $dbFrom = $dbw; $found = true; $toMaster = true; } else { diff --git a/maintenance/language/StatOutputs.php b/maintenance/language/StatOutputs.php index d994e38a9814..c6d03641d456 100644 --- a/maintenance/language/StatOutputs.php +++ b/maintenance/language/StatOutputs.php @@ -53,6 +53,7 @@ class wikiStatsOutput extends statsOutput { echo "For additional information on specific languages (the message names, the actual problems, etc.), run <code>php maintenance/language/checkLanguage.php --lang=foo</code>.\n\n"; echo 'English (en) is excluded because it is the default localization'; if( is_array( $wgDummyLanguageCodes ) ) { + $dummyCodes = array(); foreach( $wgDummyLanguageCodes as $dummyCode ) { $dummyCodes[] = $wgContLang->getLanguageName( $dummyCode ) . ' (' . $dummyCode . ')'; } diff --git a/maintenance/nukePage.php b/maintenance/nukePage.php index 4a073a5e856e..c818e73a31f8 100644 --- a/maintenance/nukePage.php +++ b/maintenance/nukePage.php @@ -56,6 +56,7 @@ class NukePage extends Maintenance { # Get corresponding revisions $this->output( "Searching for revisions..." ); $res = $dbw->query( "SELECT rev_id FROM $tbl_rev WHERE rev_page = $id" ); + $revs = array(); foreach ( $res as $row ) { $revs[] = $row->rev_id; } diff --git a/maintenance/purgeOldText.inc b/maintenance/purgeOldText.inc index 743b3fc7fd3d..45a7ae282156 100644 --- a/maintenance/purgeOldText.inc +++ b/maintenance/purgeOldText.inc @@ -44,6 +44,7 @@ function PurgeRedundantText( $delete = false ) { # Get "active" text records from the archive table echo( "Searching for active text records in archive table..." ); $res = $dbw->query( "SELECT DISTINCT ar_text_id FROM $tbl_arc" ); + $cur = array(); foreach ( $res as $row ) { $cur[] = $row->ar_text_id; } diff --git a/maintenance/storage/checkStorage.php b/maintenance/storage/checkStorage.php index 284859e955b8..c372b9c4e4df 100644 --- a/maintenance/storage/checkStorage.php +++ b/maintenance/storage/checkStorage.php @@ -130,6 +130,7 @@ class CheckStorage { // It's safe to just erase the old_flags field if ( $fix ) { $this->error( 'fixed', "Warning: old_flags set to 0", $id ); + $dbw = wfGetDB( DB_MASTER ); $dbw->ping(); $dbw->update( 'text', array( 'old_flags' => '' ), array( 'old_id' => $id ), $fname ); |