4 * Support functions for the deleteArchivedRevisions script
11 require_once( 'purgeOldText.inc' );
13 function DeleteArchivedRevisions( $delete = false ) {
15 # Data should come off the master, wrapped in a transaction
16 $dbw = wfGetDB( DB_MASTER );
19 $tbl_arch = $dbw->tableName( 'archive' );
20 # Delete as appropriate
21 echo( "Deleting archived revisions..." );
22 $dbw->query( "TRUNCATE TABLE $tbl_arch" );
25 $delete = $dbw->affectedRows() != 0;
28 # Purge redundant text records
31 PurgeRedundantText( true );