MediaWiki
REL1_20
|
Maintenance script that checks for articles to fix after adding/deleting namespaces. More...
Public Member Functions | |
__construct () | |
Default constructor. | |
execute () | |
Do the actual work. | |
Protected Attributes | |
DatabaseBase | $db |
Private Member Functions | |
checkAll ($fix, $suffix= '') | |
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. | |
getInterwikiList () | |
Get the interwiki list. | |
reportConflict ($row, $suffix) | |
Report any conflicts we find. | |
resolveConflict ($row, $resolvable, $suffix) | |
Resolve any conflicts. | |
resolveConflictOn ($row, $table, $prefix) | |
Resolve a given conflict. |
Maintenance script that checks for articles to fix after adding/deleting namespaces.
Definition at line 35 of file namespaceDupes.php.
Default constructor.
Children should call this *first* if implementing their own constructors
Reimplemented from Maintenance.
Definition at line 41 of file namespaceDupes.php.
References Maintenance\addOption().
NamespaceConflictChecker::checkAll | ( | $ | fix, |
$ | suffix = '' |
||
) | [private] |
$fix | Boolean: whether or not to fix broken entries |
$suffix | String: suffix to append to renamed articles |
Definition at line 82 of file namespaceDupes.php.
Referenced by execute().
NamespaceConflictChecker::checkNamespace | ( | $ | ns, |
$ | name, | ||
$ | fix, | ||
$ | suffix = '' |
||
) | [private] |
$ns | Integer: a namespace id |
$name | String |
$fix | Boolean: whether to fix broken entries |
$suffix | String: suffix to append to renamed articles |
Definition at line 169 of file namespaceDupes.php.
NamespaceConflictChecker::checkPrefix | ( | $ | key, |
$ | prefix, | ||
$ | fix, | ||
$ | suffix = '' |
||
) | [private] |
$key | |
$prefix | |
$fix | |
$suffix | string |
Definition at line 195 of file namespaceDupes.php.
Referenced by execute().
Do the actual work.
All child classes will need to implement this
Reimplemented from Maintenance.
Definition at line 51 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 | Integer: namespace id (id for new namespace?) |
$name | String: prefix that is being made a namespace |
Definition at line 209 of file namespaceDupes.php.
NamespaceConflictChecker::getInterwikiList | ( | ) | [private] |
Get the interwiki list.
Definition at line 152 of file namespaceDupes.php.
NamespaceConflictChecker::reportConflict | ( | $ | row, |
$ | suffix | ||
) | [private] |
NamespaceConflictChecker::resolveConflict | ( | $ | row, |
$ | resolvable, | ||
$ | suffix | ||
) | [private] |
Resolve any conflicts.
$row | Object: row from the page table to fix |
$resolvable | Boolean |
$suffix | String: suffix to append to the fixed page |
Definition at line 283 of file namespaceDupes.php.
NamespaceConflictChecker::resolveConflictOn | ( | $ | row, |
$ | table, | ||
$ | prefix | ||
) | [private] |
Resolve a given conflict.
$row | Object: row from the old broken entry |
$table | String: table to update |
$prefix | String: prefix for column name, like page or ar |
Definition at line 315 of file namespaceDupes.php.
DatabaseBase NamespaceConflictChecker::$db [protected] |
Definition at line 39 of file namespaceDupes.php.