(bug 40930) Fix regression: ContentHandler prevents action=edit append to blank page
authorBrad Jorsch <anomie.wikipedia@gmail.com>
Wed, 10 Oct 2012 19:30:40 +0000 (15:30 -0400)
committerdaniel <daniel.kinzler@wikimedia.de>
Mon, 15 Oct 2012 13:45:39 +0000 (15:45 +0200)
commit07c796d52095acc2c667569b5e69cb75fb36fd61
treea295f787461778c25468376016c54fa758f463ab
parent42c0f35133b66580dc663543a6e07ad0524a5381
(bug 40930) Fix regression: ContentHandler prevents action=edit append to blank page

Before the ContentHandler merge, using action=edit&appendtext=... on a
non-existent page would treat the page as if it existed but had no
content. After the merge, it throws an error incorrectly claiming that
appending is not supported for wikitext.

The fix is to create a new, empty content object when appending and
there is no existing content.

Change-Id: I61f2cf3911a7d9d8553fc3f745e545cb1bcfd270
includes/api/ApiEditPage.php
tests/phpunit/includes/api/ApiEditPageTest.php