MediaWiki  REL1_24
NamespaceConflictChecker Class Reference

Maintenance script that checks for articles to fix after adding/deleting namespaces. More...

Inheritance diagram for NamespaceConflictChecker:
Collaboration diagram for NamespaceConflictChecker:

List of all members.

Public Member Functions

 __construct ()
 execute ()

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.

Detailed Description

Maintenance script that checks for articles to fix after adding/deleting namespaces.

Definition at line 35 of file namespaceDupes.php.


Constructor & Destructor Documentation

Reimplemented from Maintenance.

Definition at line 41 of file namespaceDupes.php.

References Maintenance\addOption().


Member Function Documentation

NamespaceConflictChecker::checkAll ( fix,
suffix = '' 
) [private]
Todo:
Document
Parameters:
bool$fixWhether or not to fix broken entries
string$suffixSuffix to append to renamed articles
Returns:
bool

Definition at line 79 of file namespaceDupes.php.

Referenced by execute().

NamespaceConflictChecker::checkNamespace ( ns,
name,
fix,
suffix = '' 
) [private]
Todo:
Document
Parameters:
int$nsA namespace id
string$name
bool$fixWhether to fix broken entries
string$suffixSuffix to append to renamed articles
Returns:
bool

Definition at line 167 of file namespaceDupes.php.

NamespaceConflictChecker::checkPrefix ( key,
prefix,
fix,
suffix = '' 
) [private]
Todo:
Do this for real
Parameters:
int$key
string$prefix
bool$fix
string$suffix
Returns:
bool

Definition at line 194 of file namespaceDupes.php.

Referenced by execute().

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.

Parameters:
int$nsNamespace id (id for new namespace?)
string$namePrefix that is being made a namespace
Returns:
array

Definition at line 209 of file namespaceDupes.php.

Get the interwiki list.

Returns:
array

Definition at line 149 of file namespaceDupes.php.

NamespaceConflictChecker::reportConflict ( row,
suffix 
) [private]

Report any conflicts we find.

Parameters:
stdClass$row
string$suffix
Returns:
bool

Definition at line 242 of file namespaceDupes.php.

NamespaceConflictChecker::resolveConflict ( row,
resolvable,
suffix 
) [private]

Resolve any conflicts.

Parameters:
stClass$rowRow from the page table to fix
bool$resolvable
string$suffixSuffix to append to the fixed page
Returns:
bool

Definition at line 282 of file namespaceDupes.php.

NamespaceConflictChecker::resolveConflictOn ( row,
table,
prefix 
) [private]

Resolve a given conflict.

Parameters:
stdClass$rowRow from the old broken entry
string$tableTable to update
string$prefixPrefix for column name, like page or ar
Returns:
bool

Definition at line 316 of file namespaceDupes.php.


Member Data Documentation

DatabaseBase NamespaceConflictChecker::$db [protected]

Definition at line 39 of file namespaceDupes.php.


The documentation for this class was generated from the following file: