X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcleanupPreferences.php;h=5253ab34e270cd5fee27b57b774b3685209042dc;hb=4dc3ac1c375b3d2eb6172dfef8fdebe71b8c5f43;hp=4e19b79d99ea1d3a2c970dd1206f16329672daeb;hpb=8ae30552013aed802a4514bbbba399934d5f7a69;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/cleanupPreferences.php b/maintenance/cleanupPreferences.php index 4e19b79d99..5253ab34e2 100644 --- a/maintenance/cleanupPreferences.php +++ b/maintenance/cleanupPreferences.php @@ -34,8 +34,8 @@ class CleanupPreferences extends Maintenance { public function execute() { global $wgHiddenPrefs; - $dbw = wfGetDB( DB_MASTER ); - $dbw->begin( __METHOD__ ); + $dbw = $this->getDB( DB_MASTER ); + $this->beginTransaction( $dbw, __METHOD__ ); foreach ( $wgHiddenPrefs as $item ) { $dbw->delete( 'user_properties', @@ -43,7 +43,7 @@ class CleanupPreferences extends Maintenance { __METHOD__ ); }; - $dbw->commit( __METHOD__ ); + $this->commitTransaction( $dbw, __METHOD__ ); $this->output( "Finished!\n" ); } }