Merge "Follow-up I0b781c11 (2a55449): use User::getAutomaticGroups()."
[lhc/web/wiklou.git] / maintenance / cleanupTitles.php
index bb7aaa7..ad2577a 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Script to clean up broken, unparseable titles.
+ * Clean up broken, unparseable titles.
  *
  * Usage: php cleanupTitles.php [--fix]
  * Options:
  * @ingroup Maintenance
  */
 
-require_once( dirname( __FILE__ ) . '/cleanupTable.inc' );
+require_once( __DIR__ . '/cleanupTable.inc' );
 
+/**
+ * Maintenance script to clean up broken, unparseable titles.
+ *
+ * @ingroup Maintenance
+ */
 class TitleCleanup extends TableCleanup {
        public function __construct() {
                parent::__construct();
@@ -145,11 +150,10 @@ class TitleCleanup extends TableCleanup {
                                ),
                                array( 'page_id' => $row->page_id ),
                                __METHOD__ );
-                       $linkCache = LinkCache::singleton();
-                       $linkCache->clear();
+                       LinkCache::singleton()->clear();
                }
        }
 }
 
 $maintClass = "TitleCleanup";
-require_once( DO_MAINTENANCE );
+require_once( RUN_MAINTENANCE_IF_MAIN );