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