MediaWiki  1.23.2
deleteArchivedRevisions.inc
Go to the documentation of this file.
1 <?php
30 
39  public static function doDelete( $maint ) {
40  $dbw = wfGetDB( DB_MASTER );
41 
42  $dbw->begin( __METHOD__ );
43 
44  $tbl_arch = $dbw->tableName( 'archive' );
45 
46  # Delete as appropriate
47  $maint->handleOutput( "Deleting archived revisions... " );
48  $dbw->query( "DELETE FROM $tbl_arch" );
49 
50  $count = $dbw->affectedRows();
51  $deletedRows = $count != 0;
52 
53  $maint->handleOutput( "done. $count revisions deleted.\n" );
54 
55  # This bit's done
56  # Purge redundant text records
57  $dbw->commit( __METHOD__ );
58  if ( $deletedRows ) {
59  $maint->purgeRedundantText( true );
60  }
61  }
62 }
DB_MASTER
const DB_MASTER
Definition: Defines.php:56
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
wfGetDB
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
Definition: GlobalFunctions.php:3650
DeleteArchivedRevisionsImplementation\doDelete
static doDelete( $maint)
Perform the delete on archived revisions.
Definition: deleteArchivedRevisions.inc:39
DeleteArchivedRevisionsImplementation
Helper methods for the deleteArchivedRevisions.php maintenance script.
Definition: deleteArchivedRevisions.inc:29
$count
$count
Definition: UtfNormalTest2.php:96