00001 <?php
00002
00018 function deleteRevisions( $id, &$dbw ) {
00019 if( !is_array( $id ) )
00020 $id = array( $id );
00021 $dbw->delete( 'revision', array( 'rev_id' => $id ), 'deleteRevision' );
00022 }
00023
00027 function showUsage() {
00028 echo( "Finds revisions which refer to nonexisting pages and deletes them from the database\n" );
00029 echo( "USAGE: php deleteOrphanedRevisions.php [--report]\n\n" );
00030 echo( " --report : Prints out a count of affected revisions but doesn't delete them\n\n" );
00031 }
00032