Inherits Maintenance.
Public Member Functions | |
| __construct () | |
| Default constructor. | |
| execute () | |
| Do the actual work. | |
Private Member Functions | |
| checkAll ($fix, $suffix= '') | |
| getInterwikiList () | |
| Get the interwiki list. | |
| checkNamespace ($ns, $name, $fix, $suffix= '') | |
| checkPrefix ($key, $prefix, $fix, $suffix= '') | |
| getConflicts ($ns, $name) | |
| Find pages in mainspace that have a prefix of the new namespace so we know titles that will need migrating. | |
| reportConflict ($row, $suffix) | |
| Report any conflicts we find. | |
| resolveConflict ($row, $resolvable, $suffix) | |
| Resolve any conflicts. | |
| resolveConflictOn ($row, $table, $prefix) | |
| Resolve a given conflict. | |
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
Definition at line 28 of file namespaceDupes.php.
| NamespaceConflictChecker::__construct | ( | ) |
Default constructor.
Children should call this if implementing their own constructors
Reimplemented from Maintenance.
Definition at line 29 of file namespaceDupes.php.
References Maintenance::addOption().
| NamespaceConflictChecker::checkAll | ( | $ | fix, | |
| $ | suffix = '' | |||
| ) | [private] |
| $fix | bool Whether or not to fix broken entries | |
| $suffix | String Suffix to append to renamed articles |
Definition at line 68 of file namespaceDupes.php.
References $name, $ok, $wgCanonicalNamespaceNames, $wgCapitalLinks, $wgContLang, $wgNamespaceAliases, checkNamespace(), and getInterwikiList().
Referenced by execute().
| NamespaceConflictChecker::checkNamespace | ( | $ | ns, | |
| $ | name, | |||
| $ | fix, | |||
| $ | suffix = '' | |||
| ) | [private] |
| $ns | int A namespace id | |
| $name | String | |
| $fix | bool Whether to fix broken entries | |
| $suffix | String Suffix to append to renamed articles |
Definition at line 155 of file namespaceDupes.php.
References $name, $ok, getConflicts(), reportConflict(), and resolveConflict().
Referenced by checkAll(), and checkPrefix().
| NamespaceConflictChecker::checkPrefix | ( | $ | key, | |
| $ | prefix, | |||
| $ | fix, | |||
| $ | suffix = '' | |||
| ) | [private] |
Definition at line 176 of file namespaceDupes.php.
References checkNamespace(), and Maintenance::output().
Referenced by execute().
| NamespaceConflictChecker::execute | ( | ) |
Do the actual work.
All child classes will need to implement this
Reimplemented from Maintenance.
Definition at line 39 of file namespaceDupes.php.
References $wgTitle, checkAll(), checkPrefix(), Maintenance::getOption(), Maintenance::hasOption(), Title::newFromText(), Maintenance::output(), and wfGetDB().
| NamespaceConflictChecker::getConflicts | ( | $ | ns, | |
| $ | name | |||
| ) | [private] |
Find pages in mainspace that have a prefix of the new namespace so we know titles that will need migrating.
| $ns | int Namespace id (id for new namespace?) | |
| $name | String Prefix that is being made a namespace |
Definition at line 187 of file namespaceDupes.php.
References $name, $page, and $result.
Referenced by checkNamespace().
| NamespaceConflictChecker::getInterwikiList | ( | ) | [private] |
Get the interwiki list.
Definition at line 138 of file namespaceDupes.php.
References $result.
Referenced by checkAll().
| NamespaceConflictChecker::reportConflict | ( | $ | row, | |
| $ | suffix | |||
| ) | [private] |
Report any conflicts we find.
Definition at line 222 of file namespaceDupes.php.
References Title::makeTitleSafe(), and Maintenance::output().
Referenced by checkNamespace().
| NamespaceConflictChecker::resolveConflict | ( | $ | row, | |
| $ | resolvable, | |||
| $ | suffix | |||
| ) | [private] |
Resolve any conflicts.
| $row | Row from the page table to fix | |
| $resolveable | bool | |
| $suffix | String Suffix to append to the fixed page |
Definition at line 256 of file namespaceDupes.php.
References $title, Title::makeTitleSafe(), Maintenance::output(), and resolveConflictOn().
Referenced by checkNamespace().
| NamespaceConflictChecker::resolveConflictOn | ( | $ | row, | |
| $ | table, | |||
| $ | prefix | |||
| ) | [private] |
Resolve a given conflict.
| $row | Row from the old broken entry | |
| $table | String Table to update | |
| $prefix | String Prefix for column name, like page or ar |
Definition at line 285 of file namespaceDupes.php.
References Title::makeTitleSafe(), and Maintenance::output().
Referenced by resolveConflict().
1.5.9