MediaWiki  REL1_22
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:
$fixbool Whether to fix broken revisions when found

Definition at line 75 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:
$fixbool Whether to fix broken entries

Definition at line 172 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:
$fixbool
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 127 of file orphans.php.

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

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

Lock the appropriate tables for the script.

Parameters:
$dbDatabaseBase object
$extraTableString The name of any extra tables to lock (eg: text)

Definition at line 63 of file orphans.php.

References array().

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


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