X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcleanupPreferences.php;h=6e58ae9741941f193784981b15088c4a2a4f4440;hb=9f2b48a970645f3a0a6b319e5c131e2b0bd1b259;hp=4e19b79d99ea1d3a2c970dd1206f16329672daeb;hpb=9dfb45cc7c6ab53b55a484233795e7451cbee680;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/cleanupPreferences.php b/maintenance/cleanupPreferences.php index 4e19b79d99..6e58ae9741 100644 --- a/maintenance/cleanupPreferences.php +++ b/maintenance/cleanupPreferences.php @@ -34,16 +34,16 @@ 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', - array( 'up_property' => $item ), + [ 'up_property' => $item ], __METHOD__ ); }; - $dbw->commit( __METHOD__ ); + $this->commitTransaction( $dbw, __METHOD__ ); $this->output( "Finished!\n" ); } }