MediaWiki
REL1_19
|
00001 <?php 00002 00024 class DeleteArchivedRevisionsImplementation { 00025 00034 static public function doDelete( $maint ) { 00035 $dbw = wfGetDB( DB_MASTER ); 00036 00037 $dbw->begin(); 00038 00039 $tbl_arch = $dbw->tableName( 'archive' ); 00040 00041 # Delete as appropriate 00042 $maint->handleOutput( "Deleting archived revisions... " ); 00043 $dbw->query( "DELETE FROM $tbl_arch" ); 00044 00045 $count = $dbw->affectedRows(); 00046 $deletedRows = $count != 0; 00047 00048 $maint->handleOutput( "done. $count revisions deleted.\n" ); 00049 00050 # This bit's done 00051 # Purge redundant text records 00052 $dbw->commit(); 00053 if ( $deletedRows ) { 00054 $maint->purgeRedundantText( true ); 00055 } 00056 } 00057 }