X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22lang_raccourcis%22%2C%22module=%24nom_module%22%29%20.%20%22?a=blobdiff_plain;f=maintenance%2FdeleteOrphanedRevisions.php;h=6f3ea4c54d35a40d45c7a98bf7e1f13ef60e1e25;hb=13d95407dc11293a3a238f66a40db89e502c64b7;hp=4d6007063a1c2903653f4b1c699726daead8ad00;hpb=7e105610397b55d67f42f31496e92496477500e3;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/deleteOrphanedRevisions.php b/maintenance/deleteOrphanedRevisions.php index 4d6007063a..6f3ea4c54d 100644 --- a/maintenance/deleteOrphanedRevisions.php +++ b/maintenance/deleteOrphanedRevisions.php @@ -84,13 +84,10 @@ class DeleteOrphanedRevisions extends Maintenance { * Delete one or more revisions from the database * Do this inside a transaction * - * @param array $id Array of revision id values + * @param int[] $id Array of revision id values * @param IDatabase $dbw Master DB handle */ - private function deleteRevs( $id, &$dbw ) { - if ( !is_array( $id ) ) { - $id = [ $id ]; - } + private function deleteRevs( array $id, &$dbw ) { $dbw->delete( 'revision', [ 'rev_id' => $id ], __METHOD__ ); // Delete from ip_changes should a record exist. @@ -98,5 +95,5 @@ class DeleteOrphanedRevisions extends Maintenance { } } -$maintClass = "DeleteOrphanedRevisions"; +$maintClass = DeleteOrphanedRevisions::class; require_once RUN_MAINTENANCE_IF_MAIN;