The Wayback Machine - https://web.archive.org/web/20100625224255/http://www.mediawiki.org/wiki/Extension:Oversight

Extension:Oversight

From MediaWiki.org

Jump to: navigation, search
This extension may not be needed anymore as Mediawiki now has a built in feature (disabled by default) called RevisionDelete.
Manual on MediaWiki Extensions
List of MediaWiki Extensions
Crystal Clear action run.png
Oversight

Release status: stable

Revision hiding screenshot.png
Implementation Database
Description Adds a user class that allows hiding revisions.
Author(s) Brion VIBBER
License GPL
Download Download snapshot

Subversion [Help]
Browse source code

check usage (experimental)

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.

Contents

[edit] 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:
    php maintenance/sql.php extensions/Oversight/hidden.sql
  3. 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;
  4. The rights can now be assigned from Special:Userrights.

[edit] 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.

[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. (It should be noted that the core RevisionDelete does leave a marker.)

[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>';
Note Note: There is no hidden_rev_len, so rev_len will be NULL when restored, same with rev_parent_id.
Note Note: 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:

DELETE FROM mw_hidden WHERE mw_hidden.hidden_rev_id = '<THE ID>';

[edit] See also

Language: English  • Español • 日本語