X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcleanupPreferences.php;h=6e58ae9741941f193784981b15088c4a2a4f4440;hb=bd43f2abf608b189db0fe3c70f99c626d978d0b6;hp=0a89e3a266d45e4e003c5322ccc8820d08b7f794;hpb=fcda8ed55cc25b7f5cd045c6945a1f8b85344205;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/cleanupPreferences.php b/maintenance/cleanupPreferences.php index 0a89e3a266..6e58ae9741 100644 --- a/maintenance/cleanupPreferences.php +++ b/maintenance/cleanupPreferences.php @@ -19,11 +19,11 @@ * * @file * @author TyA - * @see [[bugzilla:30976]] + * @see https://phabricator.wikimedia.org/T32976 * @ingroup Maintenance */ -require_once( __DIR__ . '/Maintenance.php' ); +require_once __DIR__ . '/Maintenance.php'; /** * Maintenance script that removes hidden preferences from the database. @@ -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" ); } }