summaryrefslogtreecommitdiff
path: root/maintenance/deleteOrphanedRevisions.php
diff options
context:
space:
mode:
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;