MediaWiki  REL1_19
Orphans Class Reference

Look 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 ()
 Default constructor.
 execute ()
 Do the actual work.

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

Look for 'orphan' revisions hooked to pages which don't exist And 'childless' pages with no revisions.

Then, kill the poor widows and orphans. Man this is depressing.

Copyright (C) 2005 Brion Vibber <[email protected]> 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

Author:
<[email protected]>

Definition at line 32 of file orphans.php.


Constructor & Destructor Documentation

Default constructor.

Children should call this *first* if implementing their own constructors

Reimplemented from Maintenance.

Definition at line 33 of file orphans.php.

References Maintenance\addOption().

Here is the call graph for this function:


Member Function Documentation

Orphans::checkOrphans ( fix) [private]

Check for orphan revisions.

Parameters:
$fixbool Whether to fix broken revisions when found

Definition at line 68 of file orphans.php.

References $comment, $page, $result, $wgContLang, lockTables(), Maintenance\output(), and wfGetDB().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:

Orphans::checkSeparation ( fix) [private]

Check for pages where page_latest is wrong.

Parameters:
$fixbool Whether to fix broken entries

Definition at line 165 of file orphans.php.

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

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:

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 120 of file orphans.php.

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

Here is the call graph for this function:

Do the actual work.

All child classes will need to implement this

Reimplemented from Maintenance.

Definition at line 42 of file orphans.php.

References $wgTitle, checkOrphans(), checkSeparation(), Maintenance\hasOption(), and Title\newFromText().

Here is the call graph for this function:

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 56 of file orphans.php.

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

Here is the caller graph for this function:


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