From: Yuri Astrakhan Date: Fri, 29 Jun 2007 22:05:30 +0000 (+0000) Subject: API: Minor cleanup X-Git-Tag: 1.31.0-rc.0~52317 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=a31d9c90671e0c74d4cdde1457b734c5f4b67505;p=lhc%2Fweb%2Fwiklou.git API: Minor cleanup --- diff --git a/includes/api/ApiFormatBase.php b/includes/api/ApiFormatBase.php index f1fbc0e0ab..9fa17e41ec 100644 --- a/includes/api/ApiFormatBase.php +++ b/includes/api/ApiFormatBase.php @@ -249,4 +249,3 @@ class ApiFormatFeedWrapper extends ApiFormatBase { return __CLASS__ . ': $Id$'; } } -?> diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index dc2a697fa9..72d09bf6a6 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -77,7 +77,7 @@ class ApiMain extends ApiBase { ); private $mPrinter, $mModules, $mModuleNames, $mFormats, $mFormatNames; - private $mResult, $mShowVersions, $mEnableWrite, $mRequest, $mInternalMode, $mSquidMaxage; + private $mResult, $mAction, $mShowVersions, $mEnableWrite, $mRequest, $mInternalMode, $mSquidMaxage; /** * Constructs an instance of ApiMain that utilizes the module and format specified by $request. @@ -197,7 +197,7 @@ class ApiMain extends ApiBase { 'code' => $e->getCodeString(), 'info' => $e->getMessage()); // Only print the help message when this is for the developer, not runtime - if ($this->mPrinter->getIsHtml() || $this->getRequest()->getVal('action') == 'help') + if ($this->mPrinter->getIsHtml() || $this->mAction == 'help') ApiResult :: setContent($errMessage, $this->makeHelpMsg()); } else { @@ -247,10 +247,10 @@ class ApiMain extends ApiBase { $params = $this->extractRequestParams(); $this->mShowVersions = $params['version']; - $action = $params['action']; + $this->mAction = $params['action']; // Instantiate the module requested by the user - $module = new $this->mModules[$action] ($this, $action); + $module = new $this->mModules[$this->mAction] ($this, $this->mAction); if (!$this->mInternalMode) {