Don't check namespace in SpecialWantedtemplates
[lhc/web/wiklou.git] / maintenance / cleanupPreferences.php
index 3539689..06ae17f 100644 (file)
@@ -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;