r23570 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23569‎ | r23570 | r23571 >
Date:22:05, 29 June 2007
Author:yurik
Status:old
Tags:
Comment:
API: Minor cleanup
Modified paths:
  • /trunk/phase3/includes/api/ApiFormatBase.php (modified) (history)
  • /trunk/phase3/includes/api/ApiMain.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiMain.php
@@ -77,7 +77,7 @@
7878 );
7979
8080 private $mPrinter, $mModules, $mModuleNames, $mFormats, $mFormatNames;
81 - private $mResult, $mShowVersions, $mEnableWrite, $mRequest, $mInternalMode, $mSquidMaxage;
 81+ private $mResult, $mAction, $mShowVersions, $mEnableWrite, $mRequest, $mInternalMode, $mSquidMaxage;
8282
8383 /**
8484 * Constructs an instance of ApiMain that utilizes the module and format specified by $request.
@@ -197,7 +197,7 @@
198198 'code' => $e->getCodeString(), 'info' => $e->getMessage());
199199
200200 // Only print the help message when this is for the developer, not runtime
201 - if ($this->mPrinter->getIsHtml() || $this->getRequest()->getVal('action') == 'help')
 201+ if ($this->mPrinter->getIsHtml() || $this->mAction == 'help')
202202 ApiResult :: setContent($errMessage, $this->makeHelpMsg());
203203
204204 } else {
@@ -247,10 +247,10 @@
248248 $params = $this->extractRequestParams();
249249
250250 $this->mShowVersions = $params['version'];
251 - $action = $params['action'];
 251+ $this->mAction = $params['action'];
252252
253253 // Instantiate the module requested by the user
254 - $module = new $this->mModules[$action] ($this, $action);
 254+ $module = new $this->mModules[$this->mAction] ($this, $this->mAction);
255255
256256 if (!$this->mInternalMode) {
257257
Index: trunk/phase3/includes/api/ApiFormatBase.php
@@ -249,4 +249,3 @@
250250 return __CLASS__ . ': $Id$';
251251 }
252252 }
253 -?>

Follow-up revisions

RevisionCommit summaryAuthorDate
r23571Merging r23570 into apiedit branchcatrope22:15, 29 June 2007
r23581Merged revisions 23406-23580 via svnmerge from...david04:50, 30 June 2007

Status & tagging log