diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
commit | 63601400e476c6cf43d985f3e7b9864681695ed4 (patch) | |
tree | f7846203a952e38aaf66989d0a4702779f549962 /maintenance/deleteOrphanedRevisions.php | |
parent | 8ff01378c9e0207f9169b81966a51def645b6a51 (diff) |
Update to MediaWiki 1.20.2
this update includes:
* adjusted Arch Linux skin
* updated FluxBBAuthPlugin
* patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024
Diffstat (limited to 'maintenance/deleteOrphanedRevisions.php')
-rw-r--r-- | maintenance/deleteOrphanedRevisions.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/maintenance/deleteOrphanedRevisions.php b/maintenance/deleteOrphanedRevisions.php index c322320b..5dc7567f 100644 --- a/maintenance/deleteOrphanedRevisions.php +++ b/maintenance/deleteOrphanedRevisions.php @@ -1,8 +1,7 @@ <?php - /** - * Maintenance script to delete revisions which refer to a nonexisting page - * Sometimes manual deletion done in a rush leaves crap in the database + * Delete revisions which refer to a nonexisting page. + * Sometimes manual deletion done in a rush leaves crap in the database. * * 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 @@ -19,13 +18,19 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * http://www.gnu.org/copyleft/gpl.html * + * @file * @ingroup Maintenance * @author Rob Church <robchur@gmail.com> * @todo More efficient cleanup of text records */ -require_once( dirname( __FILE__ ) . '/Maintenance.php' ); +require_once( __DIR__ . '/Maintenance.php' ); +/** + * Maintenance script that deletes revisions which refer to a nonexisting page. + * + * @ingroup Maintenance + */ class DeleteOrphanedRevisions extends Maintenance { public function __construct() { parent::__construct(); @@ -39,7 +44,7 @@ class DeleteOrphanedRevisions extends Maintenance { $report = $this->hasOption( 'report' ); $dbw = wfGetDB( DB_MASTER ); - $dbw->begin(); + $dbw->begin( __METHOD__ ); list( $page, $revision ) = $dbw->tableNamesN( 'page', 'revision' ); # Find all the orphaned revisions @@ -66,7 +71,7 @@ class DeleteOrphanedRevisions extends Maintenance { $this->output( "done.\n" ); # Close the transaction and call the script to purge unused text records - $dbw->commit(); + $dbw->commit( __METHOD__ ); $this->purgeRedundantText( true ); } |