-# Copyright (C) 2005-2007 Brion Vibber <brion@pobox.com>
-# http://www.mediawiki.org/
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-# http://www.gnu.org/copyleft/gpl.html
-
-$options = array( 'fix', 'suffix', 'help' );
-
-/** */
-require_once( 'commandLine.inc' );
-
-if(isset( $options['help'] ) ) {
-print <<<END
-usage: namespaceDupes.php [--fix] [--suffix=<text>] [--help]
- --help : this help message
- --fix : attempt to automatically fix errors
- --suffix=<text> : dupes will be renamed with correct namespace with <text>
- appended after the article name.
- --prefix=<text> : Do an explicit check for the given title prefix
- in place of the standard namespace list.
- --verbose : Display output for checked namespaces without conflicts
-
-END;
-die;
-}
+/**
+ * Check for articles to fix after adding/deleting namespaces
+ *
+ * Copyright (C) 2005-2007 Brion Vibber <brion@pobox.com>
+ * http://www.mediawiki.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @ingroup Maintenance
+ */
+
+require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+
+class NamespaceConflictChecker extends Maintenance {
+
+ /**
+ * @var DatabaseBase
+ */
+ protected $db;
+
+ public function __construct() {
+ parent::__construct();
+ $this->mDescription = "";
+ $this->addOption( 'fix', 'Attempt to automatically fix errors' );
+ $this->addOption( 'suffix', "Dupes will be renamed with correct namespace with " .
+ "<text> appended after the article name", false, true );
+ $this->addOption( 'prefix', "Do an explicit check for the given title prefix " .
+ "appended after the article name", false, true );
+ }