Inherits Maintenance.
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. | |
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
Definition at line 32 of file orphans.php.
| 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().
| Orphans::checkOrphans | ( | $ | fix | ) | [private] |
Check for orphan revisions.
| $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.
| $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] |
| $fix | bool |
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.
| $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().
1.5.9