Extension:MirrorTools

This is the MirrorTools extension.

What can this extension do?
This extension extends various API classes to allow revisions to be added with arbitrary user names (and, in a later version, timestamps). This aids in mirroring of another wiki's content.

Usage
See the api.php? on your wiki for more details.

To use the API, first use Special:UserRights to grant MirrorTools rights to the user who will be inserting mirrored revisions.

Development notes
Presently, this only handles edits (mirroredit). Also needed are:
 * moves (mirrormove)
 * deletions (mirrordelete, to be handled by placing a deletion marker in the history)
 * undeletions (mirrorundelete, to be handled similarly to page creation)
 * protect (mirrorprotect)
 * unprotect (mirrorunprotect)
 * etc.

It may happen that a page is created on the remote wiki with a page title that already exists on the local wiki. That's fine; just merge the histories. It may happen that on the remote wiki, a page is moved to a page title that already exists on the local wiki. In such a case, the two page histories would be switched. E.g., suppose foo exists on the remote wiki (and is mirrored locally), and bar exists on the local wiki but not on the remote wiki. Then on the remote wiki, foo is moved to bar. On the local wiki, bar is then moved to foo, and foo is then moved to bar, and a redirect is put on top of the page history of foo redirecting the user to bar.

It may happen that some revisions will need to be buried in the page history below what already exists. This will require changing around the rev_parent_id values and such.

After all these are done, the next step will be to lock down mirrored pages to prevent any changes from being made to them, except by the mirrorbot.

Once that is done, the next step will be to cause clicks on "edit," "move," etc. tabs to take one to the appropriate urls at the remote wiki.

It is envisaged that a Peachy-based IRC bot will read recent changes data from remote wiki IRC feeds, make the appropriate queries to obtain the data, and hit the local API accordingly.

Installation
Add this to your LocalSettings.php file: