From ea5b014e3854aea649416084c28a318913798004 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Sat, 2 May 2009 15:03:02 +0000 Subject: [PATCH] Followup to r50132: I guess I was smoking some pretty good stuff there --- api.php | 2 +- includes/api/ApiEditPage.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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')); -- 2.20.1