https://bugzilla.wikimedia.org/show_bug.cgi?id=32037

Michael M. <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #4 from Michael M. <[email protected]> 2012-09-03 08:00:49 UTC 
---
Consider the following use case: A user wants to add a maintenance template at
the top of the article he is reading using a fancy ajaxy gadget.

Currently the script has to do the following steps:
1. Get the wikitext, timestamps and token via API.
2. Check whether the wikitext belongs to the version the user currently is
looking at (perhaps somebody else has added exactly that template since the
page has been viewed)
3. Prepend the article to the text and use the edit API to save the change.

If revids could be used, this would be simpler:
1. Get edit token and revid from the data available to JavaScript.
2. Call the edit API to make the change (with prependtext parameter there is no
need to get the wikitext first)

If the page was edited in the meantime, an edit conflict will be detected
(revid sent to API != revid of last version in DB), which is exactly the
desired behavior.

The current step #2 is not easy at all (e.g. when the user wants to add
{{db-nonsense}}, the script should notice if {{TeMpLaTe:Db-g1}} was added since
the user viewed the page), and we currently need two API calls where one would
be enough.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to