X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcleanupPreferences.php;h=06ae17fbcb3fb99881354f89389166bb0eff1baf;hb=37c16d87ebd539eb33ba2c5a41627a09e0e2f0e4;hp=3539689a3e2529c6c38fecf416900664ad26f42f;hpb=ba39f8b3f83a34f94c4f570d5b040ac26d2d1ec1;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/cleanupPreferences.php b/maintenance/cleanupPreferences.php index 3539689a3e..06ae17fbcb 100644 --- a/maintenance/cleanupPreferences.php +++ b/maintenance/cleanupPreferences.php @@ -23,7 +23,7 @@ * @ingroup Maintenance */ -require_once( __DIR__ . '/Maintenance.php' ); +require_once __DIR__ . '/Maintenance.php'; /** * Maintenance script that removes hidden preferences from the database. @@ -35,18 +35,18 @@ class CleanupPreferences extends Maintenance { global $wgHiddenPrefs; $dbw = wfGetDB( DB_MASTER ); - $dbw->begin(); - foreach( $wgHiddenPrefs as $item ) { + $dbw->begin( __METHOD__ ); + foreach ( $wgHiddenPrefs as $item ) { $dbw->delete( 'user_properties', array( 'up_property' => $item ), __METHOD__ ); }; - $dbw->commit(); + $dbw->commit( __METHOD__ ); $this->output( "Finished!\n" ); } } $maintClass = 'CleanupPreferences'; // Tells it to run the class -require_once( RUN_MAINTENANCE_IF_MAIN ); +require_once RUN_MAINTENANCE_IF_MAIN;