Page MenuHomePhabricator

Add core functionality enabling an extension to add revisions and log entries with any user, any timestamp, etc.
Closed, DeclinedPublic

Description

Author: tisane2718

Description:
Create new API extension, and enabling core functionality, to allow insertion of revisions with any user, any timestamp, any parent_id, etc. This will allow, for instance, edits on one wiki to be precisely mirrored on another via API, or article histories on two wikis to merged by API. There will need to be special access controls on this functionality, due to the potential to spoof edits by other users.


Version: unspecified
Severity: enhancement

Details

Reference
bz23665

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 11:12 PM
bzimport set Reference to bz23665.
bzimport added a subscriber: Unknown Object (MLST).

This will break database integrity by inserting conflicting keys, etc.

This is probably better done with a maintenance script anyway.

See also bug 57490, which might obviate the need for this bugfix (I'll have to take another look at it to see how practicable that might be).

With regard to comment 2, I'm not sure what kind of maintenance script you had in mind; this would need to be executed many times per second, which is unusual for a maintenance script. Also, how would the parameters, etc. work; would it import a file, for instance? It seems like it would be easier to just POST the data into the API or upload into Special:Import or a similar special page.

WikiPage::doEditContent() uses wfTimestampNow(); I would want it to accept an optional $timestamp parameter. Likewise with ApiEditPage() and all the stuff in between (e.g. EditPage::internalAttemptSave()).

Anomie set Security to None.