MediaWiki  REL1_24
Orphans Class Reference

Maintenance script that looks for 'orphan' revisions hooked to pages which don't exist and 'childless' pages with no revisions. More...

Inheritance diagram for Orphans:
Collaboration diagram for Orphans:

List of all members.

Public Member Functions

 __construct ()
 execute ()

Private Member Functions

 checkOrphans ($fix)
 Check for orphan revisions.
 checkSeparation ($fix)
 Check for pages where page_latest is wrong.
 checkWidows ($fix)
 lockTables ($db, $extraTable=array())
 Lock the appropriate tables for the script.

Detailed Description

Maintenance script that looks for 'orphan' revisions hooked to pages which don't exist and 'childless' pages with no revisions.

Definition at line 39 of file orphans.php.


Constructor & Destructor Documentation

Reimplemented from Maintenance.

Definition at line 40 of file orphans.php.

References Maintenance\addOption().


Member Function Documentation

Orphans::checkOrphans ( fix) [private]

Check for orphan revisions.

Parameters:
bool$fixWhether to fix broken revisions when found

Definition at line 73 of file orphans.php.

References $comment, $result, $wgContLang, array(), as, global, lockTables(), Maintenance\output(), and wfGetDB().

Referenced by execute().

Orphans::checkSeparation ( fix) [private]

Check for pages where page_latest is wrong.

Parameters:
bool$fixWhether to fix broken entries

Definition at line 177 of file orphans.php.

References $article, $result, $title, array(), as, WikiPage\factory(), lockTables(), Title\makeTitle(), Revision\newFromId(), Maintenance\output(), and wfGetDB().

Referenced by execute().

Orphans::checkWidows ( fix) [private]
Parameters:
bool$fix
Todo:
DON'T USE THIS YET! It will remove entries which have children, but which aren't properly attached (eg if page_latest is bogus but valid revisions do exist)

Definition at line 131 of file orphans.php.

References $result, array(), as, lockTables(), Maintenance\output(), and wfGetDB().

Reimplemented from Maintenance.

Definition at line 49 of file orphans.php.

References checkOrphans(), checkSeparation(), and Maintenance\hasOption().

Orphans::lockTables ( db,
extraTable = array() 
) [private]

Lock the appropriate tables for the script.

Parameters:
DatabaseBase$db
string$extraTableThe name of any extra tables to lock (eg: text)

Definition at line 61 of file orphans.php.

References array().

Referenced by checkOrphans(), checkSeparation(), and checkWidows().


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