r50134 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50133‎ | r50134 | r50135 >
Date:15:03, 2 May 2009
Author:catrope
Status:ok
Tags:
Comment:
Followup to r50132: I guess I was smoking some pretty good stuff there
Modified paths:
  • /trunk/phase3/api.php (modified) (history)
  • /trunk/phase3/includes/api/ApiEditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiEditPage.php
@@ -60,7 +60,7 @@
6161 $this->dieUsageMsg(array('invalidtitle', $params['title']));
6262 // Some functions depend on $wgTitle == $ep->mTitle
6363 global $wgTitle;
64 - $titleObj = $wgTitle;
 64+ $wgTitle = $titleObj;
6565
6666 if($params['createonly'] && $titleObj->exists())
6767 $this->dieUsageMsg(array('createonly-exists'));
Index: trunk/phase3/api.php
@@ -74,7 +74,7 @@
7575
7676 // Set a dummy $wgTitle, because $wgTitle == null breaks various things
7777 // In a perfect world this wouldn't be necessary
78 -$wgTitle = Title::newFromTitle('API');
 78+$wgTitle = Title::newFromText('API');
7979
8080 /* Construct an ApiMain with the arguments passed via the URL. What we get back
8181 * is some form of an ApiMain, possibly even one that produces an error message,

Follow-up revisions

RevisionCommit summaryAuthorDate
r50220API backports:...tstarling14:07, 5 May 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r50132API: Set $wgTitle to a dummy title in api.php, and introduce defined('API') a...catrope14:47, 2 May 2009

Status & tagging log