Last modified: 2011-10-29 16:40:00 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T34017, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32017 - Expose the timestamp when the edit token was generated along with the tokens
Expose the timestamp when the edit token was generated along with the tokens
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.18.x
All All
: Unprioritized enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-28 08:45 UTC by Michael M.
Modified: 2011-10-29 16:40 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Michael M. 2011-10-28 08:45:41 UTC
With mw.user.tokens.get( 'editToken' ) it is possible to get the edit token without calling the API. But to detect conflicts you should set starttimestamp to the time when you obtained the edit token ([[mw:API:Edit]]).
So this timestamp should be retrievable as easily as the tokens, perhaps as mw.user.tokens.get( 'timestamp' ).
Comment 1 Roan Kattouw 2011-10-28 08:59:44 UTC
That documentation page probably isn't worded very well. starttimestamp should be set to the timestamp when you obtained the page content for the user to edit. It's used to detect whether the page was deleted or recreated in the meantime.

I've reworded the documentation page.
Comment 2 Umherirrender 2011-10-28 09:45:40 UTC
And why is there a value 'starttimestamp', when getting tokens with prop=info? Is that not a timestamp to give back into action=edit? Instead the client should create an own timetamp in UTC of the current time and give that into action=edit?
Comment 3 Roan Kattouw 2011-10-28 19:49:34 UTC
(In reply to comment #2)
> And why is there a value 'starttimestamp', when getting tokens with prop=info?
> Is that not a timestamp to give back into action=edit? Instead the client
> should create an own timetamp in UTC of the current time and give that into
> action=edit?
I believe that's there for convenience and that it's essentially the server time.
Comment 4 Umherirrender 2011-10-29 16:40:00 UTC
Please rephrase also the help text in ApiEditPage.php:

starttimestamp      - Timestamp when you obtained the edit token.
                      Used to detect edit conflicts; leave unset to ignore conflicts

Thanks.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links