On 27.11.2012 17:10, Denny Vrandečić wrote:
Today a question appeared: what to do if an edit is
request that actually does
not change the content (e.g. setting the sitelink of an item to X when it is
already X in the language).
Currently, the API reports an error because the save failed (there is nothing to
save, obviously). If you try the same on MediaWiki core, it behaves as if
everything went well, but doesn't do a save (i.e. the save does not happen, but
the state is the same and thus the software just lets you proceed as if you have
made the edit).
It should do nothing, report success, but include a warning that nothing was
done. lastrevid should contain the latest revision ID.
I'm not sure why the API would report an error in such a case. It shouldn't
really, and I thought I looked at the test case for this recently. EditEntity at
least supports it, as far as I know.
-- daniel
--
Daniel Kinzler, Softwarearchitekt
Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e. V.