# 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;
}
$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;
$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 {
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 . ')';
}
# 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;
}
# 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;
}
// 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 );