Orphans Class Reference

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

Inherits Maintenance.

List of all members.

Public Member Functions

 __construct ()
 Default constructor.
 execute ()
 Do the actual work.

Private Member Functions

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


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 <brion@pobox.com> 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:
<brion@pobox.com>

Definition at line 32 of file orphans.php.


Constructor & Destructor Documentation

Orphans::__construct (  ) 

Default constructor.

Children should call this if implementing their own constructors

Reimplemented from Maintenance.

Definition at line 33 of file orphans.php.

References Maintenance::addOption().


Member Function Documentation

Orphans::checkOrphans ( fix  )  [private]

Check for orphan revisions.

Parameters:
$fix bool Whether to fix broken revisions when found

Definition at line 67 of file orphans.php.

References $dbw, $page, $result, $wgContLang, lockTables(), Maintenance::output(), and wfGetDB().

Referenced by execute().

Orphans::checkSeparation ( fix  )  [private]

Check for pages where page_latest is wrong.

Parameters:
$fix bool Whether to fix broken entries

Definition at line 165 of file orphans.php.

References $dbw, $page, $result, $title, Title::makeTitle(), Revision::newFromId(), Maintenance::output(), and wfGetDB().

Referenced by execute().

Orphans::checkWidows ( fix  )  [private]

Parameters:
$fix bool
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 119 of file orphans.php.

References $dbw, $page, $result, $wgContLang, lockTables(), Maintenance::output(), printf(), and wfGetDB().

Orphans::execute (  ) 

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().

Orphans::lockTables ( &$  db,
extraTable = null 
) [private]

Lock the appropriate tables for the script.

Parameters:
$db Database object
$extraTable String The name of any extra tables to lock (eg: text)

Definition at line 56 of file orphans.php.

Referenced by checkOrphans(), and checkWidows().


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

Generated on Sat Apr 30 22:57:44 2011 for MediaWiki by  doxygen 1.5.9