summaryrefslogtreecommitdiff
path: root/maintenance/deleteOrphanedRevisions.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
commit4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch)
treeaf68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /maintenance/deleteOrphanedRevisions.php
parentaf4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff)
Update to MediaWiki 1.22.0
Diffstat (limited to 'maintenance/deleteOrphanedRevisions.php')
-rw-r--r--maintenance/deleteOrphanedRevisions.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/maintenance/deleteOrphanedRevisions.php b/maintenance/deleteOrphanedRevisions.php
index f0da9a82..f0a96928 100644
--- a/maintenance/deleteOrphanedRevisions.php
+++ b/maintenance/deleteOrphanedRevisions.php
@@ -24,7 +24,7 @@
* @todo More efficient cleanup of text records
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that deletes revisions which refer to a nonexisting page.
@@ -54,8 +54,9 @@ class DeleteOrphanedRevisions extends Maintenance {
# Stash 'em all up for deletion (if needed)
$revisions = array();
- foreach ( $res as $row )
+ foreach ( $res as $row ) {
$revisions[] = $row->rev_id;
+ }
$count = count( $revisions );
$this->output( "found {$count}.\n" );
@@ -83,11 +84,12 @@ class DeleteOrphanedRevisions extends Maintenance {
* @param $dbw DatabaseBase class (needs to be a master)
*/
private function deleteRevs( $id, &$dbw ) {
- if ( !is_array( $id ) )
+ if ( !is_array( $id ) ) {
$id = array( $id );
+ }
$dbw->delete( 'revision', array( 'rev_id' => $id ), __METHOD__ );
}
}
$maintClass = "DeleteOrphanedRevisions";
-require_once( RUN_MAINTENANCE_IF_MAIN );
+require_once RUN_MAINTENANCE_IF_MAIN;