Manual:deleteArchivedRevisions.php

From MediaWiki.org
Jump to: navigation, search


MediaWiki File: deleteArchivedRevisions.php
Location: /maintenance/
Source code:

HEAD1.18beta1
1.18.11.17.2

Classes: DeleteArchivedRevisions


MediaWiki File: deleteArchivedRevisions.inc
Location: /maintenance/
Source code:

HEAD1.18beta1
1.18.11.17.2

Classes: DeleteArchivedRevisions


Deletes all the archived (deleted from public) revisions, by clearing out the archive table.

Prior to MediaWiki 1.16, a helper file deleteArchivedRevisions.inc contained the class that performs the work. This class was merged into deleteArchivedRevisions.php in 1.16.

The standard version of this script fails if mediawiki is using sqlite as sqlite appears to not support the TRUNCATE verb. To fix this modify the line:

$dbw->query( "TRUNCATE TABLE $tbl_arch" );

to:

$dbw->query( "DELETE FROM $tbl_arch" );

This should be efficient as there is a 'truncate optimisation' for this form of DELETE statement.

[edit] Usage

Option/Parameter Description
--delete Does the deletion (otherwise displays the number of revisions to delete).
Language: English  • Polski
Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox