X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fstorage%2FfixBug20757.php;h=e926f56baebd709b71fd32a411ec2d99e44af68e;hb=44cebea941236e165bf55e80565d6679529c7280;hp=dd4cd54ba2e39a23d6ad4f56a56fc1724f754263;hpb=45dabe974013e4cfe0712abc05de38598b3a340b;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/storage/fixBug20757.php b/maintenance/storage/fixBug20757.php index dd4cd54ba2..e926f56bae 100644 --- a/maintenance/storage/fixBug20757.php +++ b/maintenance/storage/fixBug20757.php @@ -42,8 +42,8 @@ class FixBug20757 extends Maintenance { } function execute() { - $dbr = wfGetDB( DB_SLAVE ); - $dbw = wfGetDB( DB_MASTER ); + $dbr = $this->getDB( DB_SLAVE ); + $dbw = $this->getDB( DB_MASTER ); $dryRun = $this->getOption( 'dry-run' ); if ( $dryRun ) { @@ -213,7 +213,7 @@ class FixBug20757 extends Maintenance { if ( !$dryRun ) { // Reset the text row to point to the original copy - $dbw->begin( __METHOD__ ); + $this->beginTransaction( $dbw, __METHOD__ ); $dbw->update( 'text', // SET @@ -241,7 +241,7 @@ class FixBug20757 extends Maintenance { ), __METHOD__ ); - $dbw->commit( __METHOD__ ); + $this->commitTransaction( $dbw, __METHOD__ ); $this->waitForSlaves(); } @@ -283,7 +283,7 @@ class FixBug20757 extends Maintenance { unset( $this->mapCache[$key] ); } - $dbr = wfGetDB( DB_SLAVE ); + $dbr = $this->getDB( DB_SLAVE ); $map = array(); $res = $dbr->select( 'revision', array( 'rev_id', 'rev_text_id' ),