r23571 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23570‎ | r23571 | r23572 >
Date:22:15, 29 June 2007
Author:catrope
Status:old
Tags:
Comment:
Merging r23570 into apiedit branch
Modified paths:
  • /branches/apiedit/phase3/includes/api/ApiFormatBase.php (modified) (history)
  • /branches/apiedit/phase3/includes/api/ApiMain.php (modified) (history)

Diff [purge]

Index: branches/apiedit/phase3/includes/api/ApiFormatBase.php
@@ -249,4 +249,3 @@
250250 return __CLASS__ . ': $Id$';
251251 }
252252 }
253 -?>
Index: branches/apiedit/phase3/includes/api/ApiMain.php
@@ -78,7 +78,7 @@
7979 );
8080
8181 private $mPrinter, $mModules, $mModuleNames, $mFormats, $mFormatNames;
82 - private $mResult, $mShowVersions, $mEnableWrite, $mRequest, $mInternalMode, $mSquidMaxage;
 82+ private $mResult, $mAction, $mShowVersions, $mEnableWrite, $mRequest, $mInternalMode, $mSquidMaxage;
8383
8484 /**
8585 * Constructs an instance of ApiMain that utilizes the module and format specified by $request.
@@ -210,7 +210,7 @@
211211 'code' => $e->getCodeString(), 'info' => $e->getMessage());
212212
213213 // Only print the help message when this is for the developer, not runtime
214 - if ($this->mPrinter->getIsHtml())
 214+ if ($this->mPrinter->getIsHtml() || $this->mAction == 'help')
215215 ApiResult :: setContent($errMessage, $this->makeHelpMsg());
216216
217217 } else {
@@ -260,10 +260,10 @@
261261 $params = $this->extractRequestParams();
262262
263263 $this->mShowVersions = $params['version'];
264 - $action = $params['action'];
 264+ $this->mAction = $params['action'];
265265
266266 // Instantiate the module requested by the user
267 - $module = new $this->mModules[$action] ($this, $action);
 267+ $module = new $this->mModules[$this->mAction] ($this, $this->mAction);
268268
269269 if (!$this->mInternalMode) {
270270

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r23570API: Minor cleanupyurik22:05, 29 June 2007

Status & tagging log