Manual:deleteArchivedRevisions.php
From MediaWiki.org
(Redirected from Manual:DeleteArchivedRevisions.inc)
| MediaWiki File: deleteArchivedRevisions.php | |
|---|---|
| Location: | /maintenance/ |
| Source code: | |
| Classes: | DeleteArchivedRevisions |
| MediaWiki File: deleteArchivedRevisions.inc | |
|---|---|
| Location: | /maintenance/ |
| Source code: | |
| 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 |
|---|