just as a matter of curiosity, why do you use timestamps here, rather than 
revision ids?  it seems to me there would be less confusion that way: this is 
the revision id for the particular version of the page I am making changes to; 
if the page I try to edit has a different revision id, then clearly it's been 
changed.  

but at any rate, let me see if I can summarize it correctly:

1) get the latest revision of the page, along with its timestamp

2) make the changes you want to make

3) resubmit the changed page with the timestamp you got in (1).

   a) if it matches, that means the revision you were working on is still the 
latest revision, and the edit goes through

   b) if it doesn't match, some change was made to the page (or something funky 
happened with the timestamp) and the server sends back an edit conflict (or 
other) error.

________________________________________
Man is the only animal that blushes. Or needs to.  - Mark Twain


--- On Thu, 10/23/08, Platonides <[EMAIL PROTECTED]> wrote:

> From: Platonides <[EMAIL PROTECTED]>
> Subject: Re: [Mediawiki-api] editing and timestamp confusion
> To: "MediaWiki API announcements & discussion" 
> <[email protected]>
> Date: Thursday, October 23, 2008, 2:44 PM
> Russell Blau wrote:
> > "Roan Kattouw" <[EMAIL PROTECTED]>
> said:
> >> Actually, using a different timestamp than the
> last revision's timestamp
> >> will fail: the edit conflict check requires that
> the timestamp are
> >> *exactly the same*, so timestamps of earlier
> revisions *or* later
> >> revisions *will* *not* *work*. You really need to
> get that one
> >> timestamp. (I apologize for overusing the * in
> this paragraph.)
> > 
> > This confused me.  How can there be a "later
> revision" than "the last 
> > revision's timestamp"?  Either the revision
> is the last one, or it is 
> > not....
> > 
> > Russ
> 
> You could be trying to trick mediawiki by passing
> timestamps in the 
> future, or timestamps to newer, now-deleted revisions.
> 
> _______________________________________________
> Mediawiki-api mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api


      

_______________________________________________
Mediawiki-api mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

Reply via email to