A patch for MediaWiki 1.14.1
Hi!
In our company (Customized InformSystems, http://www.custis.ru/), we use MediaWiki for maintaining corporate knowledgebases, and I'm responsible for its support and etc. Sorry in advance for my english :-)
I have greatly improved MediaWiki XML Export and Import mechanism and I want to submit a patch. The following features are added:
- Support for exporting and importing UPLOADS - either attached inside the output file, which will be a multipart/related document with binary parts in this case, or as URLs + SHA1 hashes inside the XML document, so that destination Wiki could download them by itself.
- Support for selecting pages from category with subcategories.
- Support for selecting pages from specific namespace.
- Support for selecting pages modified after a specific date.
- Support for selecting pages linked to selected ("pagelinks closure").
- The DVCS-like detection of "conflicts" during import and extended import report with 5 types of messages:
- All revisions were previously imported. No local changes.
- All revisions were previously imported. Page changed locally.
- N revisions imported.
- N revisions imported (new page).
- N revisions imported (conflict: XX (import) and YY (local)).
- With all these improvements, the import mechanism is backwards compatible and is able to import dumps from MediaWikis without these improvements.
Unfortunately (or fortunately? :-D), the patch requires a change to filerepo/LocalFile.php, because there is an irrationality: archived versions of uploads (oldimages) are stored with the timestamp in the file name which IS NOT EQUAL to the oldimage timestamp in the database. The timestamp in the file name is the timestamp of archiving, i.e. the timestamp of NEXT revision of upload. IMO, it is an inconsistent behaviour: oldimage file names depend on the order of import. So I'll submit a patch and a tool to convert timestamps in the oldimage archive.
I think all these features are very useful for MediaWiki users, so I ask you if it is possible to incorporate these changes into the MediaWiki code? Now, they are written against 1.14.1, but I can port them into trunk, if it is needed. The patch submitted also DOES NOT conform to your code-style, for example, I hate adding spaces after opening and before closing braces. But if it is needed, I can change the patch to conform.
But I think you can anyway start reviewing the patch :) IMO, it's very useful.
Version: unspecified
Severity: enhancement
attachment Y-001-import-export-images-and-conflicts.diff ignored as obsolete