X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcleanupPreferences.php;h=6e58ae9741941f193784981b15088c4a2a4f4440;hb=21948ec459cbb99167c09b59b7296b7f5d502aa0;hp=4e19b79d99ea1d3a2c970dd1206f16329672daeb;hpb=1271bb75c60f98720a24ed1bac13a48f2181fb00;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" ); } }