X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FdeleteOrphanedRevisions.php;h=7f1ffe418b7868e49910317c6f49c9eff58b8a64;hb=d0e16713bcf0a065d22caad2125cc25d4d9245ef;hp=1eb7262e7bfd4ef9c723c199e5faa50e81b1cdf7;hpb=b905c6b371b1314ac3347e1fbf1a5af2fc58fd67;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/deleteOrphanedRevisions.php b/maintenance/deleteOrphanedRevisions.php index 1eb7262e7b..7f1ffe418b 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. @@ -49,7 +49,8 @@ class DeleteOrphanedRevisions extends Maintenance { # Find all the orphaned revisions $this->output( "Checking for orphaned revisions..." ); - $sql = "SELECT rev_id FROM {$revision} LEFT JOIN {$page} ON rev_page = page_id WHERE page_namespace IS NULL"; + $sql = "SELECT rev_id FROM {$revision} LEFT JOIN {$page} ON rev_page = page_id " + . "WHERE page_namespace IS NULL"; $res = $dbw->query( $sql, 'deleteOrphanedRevisions' ); # Stash 'em all up for deletion (if needed) @@ -80,8 +81,8 @@ class DeleteOrphanedRevisions extends Maintenance { * Delete one or more revisions from the database * Do this inside a transaction * - * @param $id Array of revision id values - * @param $dbw DatabaseBase class (needs to be a master) + * @param array $id Array of revision id values + * @param DatabaseBase $dbw DatabaseBase class (needs to be a master) */ private function deleteRevs( $id, &$dbw ) { if ( !is_array( $id ) ) { @@ -92,4 +93,4 @@ class DeleteOrphanedRevisions extends Maintenance { } $maintClass = "DeleteOrphanedRevisions"; -require_once( RUN_MAINTENANCE_IF_MAIN ); +require_once RUN_MAINTENANCE_IF_MAIN;