API: Enforce section=new constraint when using 'redirect' mode
authorAdam Roses Wight <awight@wikimedia.org>
Sun, 18 May 2014 07:04:36 +0000 (00:04 -0700)
committerBrad Jorsch <bjorsch@wikimedia.org>
Thu, 22 May 2014 20:08:22 +0000 (16:08 -0400)
commit5971b2c39a4856bf119510aa37e9c1ee82ea7e1e
treebf0d539e0190f54d0f1773836db0605dac2b9efb
parent04d4a19ec2fda92cec2ec4cb498cfc224d57d6fc
API: Enforce section=new constraint when using 'redirect' mode

Finish implementation of the 'redirect' edit API parameter.  This flag
should only be used as a convenience when adding a new section, appending,
or prepending.  Any other usage must be done using the long-cut (fetch page,
determine if it is a redirect, follow redirects and edit the target page's
content).

This patch takes apart the "EditConflict_redirect" test, because it no
longer makes sense--unless you dear reader can figure out how to force an
edit conflict when only adding a section?

Bug: 24330
Change-Id: Ie3f7273c18e156da1e50e1a36aac2e5341710982
includes/api/ApiEditPage.php
tests/phpunit/includes/api/ApiEditPageTest.php