Use the same connection for updates everywhere. Hopefully, this ugly code will not...
authorMax Semenik <maxsem@users.mediawiki.org>
Tue, 17 Aug 2010 14:17:13 +0000 (14:17 +0000)
committerMax Semenik <maxsem@users.mediawiki.org>
Tue, 17 Aug 2010 14:17:13 +0000 (14:17 +0000)
maintenance/updaters.inc

index 42d46db..e941f65 100644 (file)
@@ -33,8 +33,8 @@ $wgExtModifiedFields = array(); // table, index, dir
 # Obviously, only use this for updates that occur after the updatelog table was
 # created!
 function update_row_exists( $key ) {
-       $dbr = wfGetDB( DB_SLAVE );
-       $row = $dbr->selectRow(
+       global $wgDatabase;
+       $row = $wgDatabase->selectRow(
                'updatelog',
                '1',
                array( 'ul_key' => $key ),