Extension:Oversight
From MediaWiki.org
|
Oversight Release status: stable |
|
|---|---|
| Implementation | Database |
| Description | Adds a user class that allows hiding revisions. |
| Author(s) | Brion VIBBER |
| Download | 1.10, 1.11, Trunk |
| Added rights | hiderevision, oversight |
| Hooks used |
ArticleViewHeader |
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 developer.
This extension is a temporary hack until the new revision deletion system is 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.
[edit] Installation
- Download the files for your version to extensions/Oversight: 1.10, 1.11, Trunk.
- Add the required table to the database:
mysql -u[put your username here] -p [put your database name here] < hidden.sql - Add these lines to LocalSettings.php (adjust the user groups as desired):
require_once("$IP/extensions/Oversight/HideRevision.php");$wgGroupPermissions['oversight']['hiderevision'] = true;$wgGroupPermissions['oversight']['oversight'] = true;
- The rights can now be assigned from Special:Userrights.
[edit] 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.
[edit] 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):
INSERT INTO mw_revision(rev_page,rev_id,rev_text_id,rev_comment,rev_user,rev_user_text, rev_timestamp,rev_minor_edit,rev_deleted) SELECT hidden_page, hidden_rev_id, hidden_text_id, hidden_comment, hidden_user, hidden_user_text, hidden_timestamp, hidden_minor_edit, hidden_deleted FROM mw_hidden WHERE mw_hidden.hidden_rev_id = '<THE ID>';
After you CONFIRMED that the revision is back, then you can run:
DELETE FROM mw_hidden WHERE mw_hidden.hidden_rev_id = '<THE ID>';
This extension is being used on one or more of Wikimedia's wikis. It means that the extension is stable and works well enough to be used by such high traffic websites. A full list of the extensions installed on a particular wiki is produced by Special:Version on that wiki.

