Extension:EditWarning/0.4

What can this extension do?
On pages which are being edited by many users simultaneously edit conflicts can easily happen. This extension tries to avoid this problem by showing a warning message if the user edits a page that is being edited by other users at the same time. It's very similar to the MoinMoin Wiki warning with the difference that it doesn't lock the page (this feature is planned for the final 0.4 release).

Notice: It's not recommended to use this extension if anonymous users are allowed to edit pages, because it ignores anonymous page edits.

'''IMPORTANT!: This is an alpha release. While you're encouraged to test it and report bugs and problems, it's not recommended to use it on productive MediaWiki installations. It could kill sweet little bunnies, I warned you! :)'''

The latest stable version: EditWarning 0.3.

Licence
GNU GPL Version 2.0 or later. (http://www.gnu.org/licenses/gpl-2.0.html)

Installation
CREATE TABLE IF NOT EXISTS "editwarning_locks" ( "user_id" int(10) unsigned NOT NULL,  "user_name" varchar(255) NOT NULL,  "article_id" int(10) unsigned NOT NULL,  "timestamp" int(11) unsigned NOT NULL,  "section" int(2) unsigned NOT NULL,  KEY "user_id" ("user_id"),  KEY "article_id" ("article_id") );
 * Move the folder "EditWarning" to the "extensions" folder of your MediaWiki installation.
 * Execute the following SQL statements in your MediaWiki database:

ALTER TABLE `editwarning_locks` ADD CONSTRAINT "editwarning_locks_ibfk_1" FOREIGN KEY ("user_id") REFERENCES "user" ("user_id") ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT "editwarning_locks_ibfk_2" FOREIGN KEY ("article_id") REFERENCES "page" ("page_id") ON DELETE CASCADE ON UPDATE CASCADE;
 * Add the following to LocalSettings.php:


 * Open the file includes/EditPage.php of your MediaWiki installation and search for the line:


 * Replace that line with:


 * Optional: The default timeout is set to 10 minutes. If you want to change this setting, add this line to your LocalSettings.php (Note: The value is the number of minutes):


 * Optional: The extension hides everything except the editor area (see screenshots). If you don't like this behavior, add this line to your LocalSettings.php:

Known Issues

 * The extension can only recognize the cancel of page editing if the user uses the "Cancel" button. Otherwise the warning will be showed until the timeout (default 10 minutes).