From: Roan Kattouw Date: Sat, 2 May 2009 15:03:02 +0000 (+0000) Subject: Followup to r50132: I guess I was smoking some pretty good stuff there X-Git-Tag: 1.31.0-rc.0~41903 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=ea5b014e3854aea649416084c28a318913798004;p=lhc%2Fweb%2Fwiklou.git Followup to r50132: I guess I was smoking some pretty good stuff there --- diff --git a/api.php b/api.php index 8702ce15b3..2f1d1a3112 100644 --- a/api.php +++ b/api.php @@ -74,7 +74,7 @@ define('API', true); // Set a dummy $wgTitle, because $wgTitle == null breaks various things // In a perfect world this wouldn't be necessary -$wgTitle = Title::newFromTitle('API'); +$wgTitle = Title::newFromText('API'); /* Construct an ApiMain with the arguments passed via the URL. What we get back * is some form of an ApiMain, possibly even one that produces an error message, diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php index 4fb21fbadd..09731e7d8f 100644 --- a/includes/api/ApiEditPage.php +++ b/includes/api/ApiEditPage.php @@ -60,7 +60,7 @@ class ApiEditPage extends ApiBase { $this->dieUsageMsg(array('invalidtitle', $params['title'])); // Some functions depend on $wgTitle == $ep->mTitle global $wgTitle; - $titleObj = $wgTitle; + $wgTitle = $titleObj; if($params['createonly'] && $titleObj->exists()) $this->dieUsageMsg(array('createonly-exists'));