Merge "Follow-up I0b781c11 (2a55449): use User::getAutomaticGroups()."
[lhc/web/wiklou.git] / maintenance / cleanupTitles.php
index fe6a63a..ad2577a 100644 (file)
@@ -1,12 +1,12 @@
 <?php
-/*
- * Script to clean up broken, unparseable titles.
+/**
+ * Clean up broken, unparseable titles.
  *
  * Usage: php cleanupTitles.php [--fix]
  * Options:
  *   --fix  Actually clean up titles; otherwise just checks for them
  *
- * Copyright (C) 2005 Brion Vibber <brion@pobox.com>
+ * Copyright © 2005 Brion Vibber <brion@pobox.com>
  * http://www.mediawiki.org/
  *
  * This program is free software; you can redistribute it and/or modify
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
+ * @file
  * @author Brion Vibber <brion at pobox.com>
  * @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();
@@ -144,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 );