Extension:Oversight

The Oversight extension adds a user class that allows revisions to be permanently hidden from all users. Note that the revisions can only be restored by a system administrator with database access.

This extension was a temporary hack until the new revision deletion system became ready to replace the old archive deletion. The revisions are shoved into a parallel table similar to the archive table, but not accessible through any of the normal channels in the wiki. Items can be manually restored from the database if required.

Installation

 * 1) Download the files for your version to extensions/Oversight in tar.gz format (select your MediaWiki version from the drop-down) or grab it directly from Subversion: 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, Trunk.
 * 2) Add the required table to the database:

The rights can now be assigned from Special:Userrights.
 * 1) Add these lines to LocalSettings.php (adjust the user groups as desired):

Installing without command prompt access
If you are using a remote server and do not have command prompt access, but do have access through phpMyAdmin, substitute these steps for step #2 above:


 * 1) Download hidden.sql.
 * 2) In phpMyAdmin, click the database you're using for mediawiki along the left side
 * 3) On the next screen, click the "SQL" tab at the top.
 * 4) At "Location of the text file", choose one of the files, select compression "None", and click the bottom "Go" button.
 * If your phpMyAdmin screen has only a text field and no text file chooser, click the "SQL" button in the left-side column, under the phpMyAdmin logo, and click the "import files" tab in the new window that opens.

You may still get a returned error of "1146: Table 'sitename_mdw1.mdw_hidden' doesn't exist (localhost)". Find 'hidden' and make sure that it is named correctly; sometimes the script does not add the correct prefix.

Use
Users with the Oversight class will have an additional 'hide revision' tab when viewing an old revision, edit difference, or deleted revision. The edit can be hidden from all users by clicking this tab, adding a reason, and confirming. The most recent edit to a page cannot be hidden unless the page is deleted; to hide it, you must first revert or delete the edit.

Note that hiding revisions may create misleading edit differences, since any changes made in hidden revisions will seem to have been made by the next visible edit. In situations where good content is added in hidden revisions, there may be no simple solution. The extension may eventually replace the removed revisions with an explicitly visible marker instead. (It should be noted that the core RevisionDelete does leave a marker.)

Correcting mistakes
If you accidentally deleted a revision, then you need DB access to restore it. First, find the revision ID that you need to restore. Then, you will need to use an SQL query to get it back in (replace "mw_" with your DB prefix):


 * There is no hidden_rev_len, so rev_len will be NULL when restored, same with rev_parent_id.


 * Ignore rev_deleted if you have an older version of MediaWiki that does not have the column.

After you CONFIRMED that the revision is back, then you can run: