* BREAKING CHANGE: action=purge requires write rights and, for anonymous users,
a POST request
* (bug 15935) Added action=userrights to add/remove users to/from groups
+* (bug 18099) Using appendtext to edit a non-existent page causes an interface
+ message to be included in the page text
=== Languages updated in 1.15 ===
$toMD5 = $params['text'];
if(!is_null($params['appendtext']) || !is_null($params['prependtext']))
{
- $content = $articleObj->getContent();
+ // For non-existent pages, Article::getContent()
+ // returns an interface message rather than ''
+ // We do want getContent()'s behavior for non-existent
+ // MediaWiki: pages, though
+ if($articleObj->getID() == 0 && $titleObj->getNamespace() != NS_MEDIAWIKI)
+ $content = '';
+ else
+ $content = $articleObj->getContent();
$params['text'] = $params['prependtext'] . $content . $params['appendtext'];
$toMD5 = $params['prependtext'] . $params['appendtext'];
}