<?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();
),
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 );