Index: trunk/phase3/includes/api/ApiMain.php |
— | — | @@ -77,7 +77,7 @@ |
78 | 78 | ); |
79 | 79 | |
80 | 80 | private $mPrinter, $mModules, $mModuleNames, $mFormats, $mFormatNames; |
81 | | - private $mResult, $mShowVersions, $mEnableWrite, $mRequest, $mInternalMode, $mSquidMaxage; |
| 81 | + private $mResult, $mAction, $mShowVersions, $mEnableWrite, $mRequest, $mInternalMode, $mSquidMaxage; |
82 | 82 | |
83 | 83 | /** |
84 | 84 | * Constructs an instance of ApiMain that utilizes the module and format specified by $request. |
— | — | @@ -197,7 +197,7 @@ |
198 | 198 | 'code' => $e->getCodeString(), 'info' => $e->getMessage()); |
199 | 199 | |
200 | 200 | // 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') |
202 | 202 | ApiResult :: setContent($errMessage, $this->makeHelpMsg()); |
203 | 203 | |
204 | 204 | } else { |
— | — | @@ -247,10 +247,10 @@ |
248 | 248 | $params = $this->extractRequestParams(); |
249 | 249 | |
250 | 250 | $this->mShowVersions = $params['version']; |
251 | | - $action = $params['action']; |
| 251 | + $this->mAction = $params['action']; |
252 | 252 | |
253 | 253 | // 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); |
255 | 255 | |
256 | 256 | if (!$this->mInternalMode) { |
257 | 257 | |
Index: trunk/phase3/includes/api/ApiFormatBase.php |
— | — | @@ -249,4 +249,3 @@ |
250 | 250 | return __CLASS__ . ': $Id$'; |
251 | 251 | } |
252 | 252 | } |
253 | | -?> |