Index: branches/apiedit/phase3/includes/api/ApiFormatBase.php |
— | — | @@ -249,4 +249,3 @@ |
250 | 250 | return __CLASS__ . ': $Id$'; |
251 | 251 | } |
252 | 252 | } |
253 | | -?> |
Index: branches/apiedit/phase3/includes/api/ApiMain.php |
— | — | @@ -78,7 +78,7 @@ |
79 | 79 | ); |
80 | 80 | |
81 | 81 | private $mPrinter, $mModules, $mModuleNames, $mFormats, $mFormatNames; |
82 | | - private $mResult, $mShowVersions, $mEnableWrite, $mRequest, $mInternalMode, $mSquidMaxage; |
| 82 | + private $mResult, $mAction, $mShowVersions, $mEnableWrite, $mRequest, $mInternalMode, $mSquidMaxage; |
83 | 83 | |
84 | 84 | /** |
85 | 85 | * Constructs an instance of ApiMain that utilizes the module and format specified by $request. |
— | — | @@ -210,7 +210,7 @@ |
211 | 211 | 'code' => $e->getCodeString(), 'info' => $e->getMessage()); |
212 | 212 | |
213 | 213 | // 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') |
215 | 215 | ApiResult :: setContent($errMessage, $this->makeHelpMsg()); |
216 | 216 | |
217 | 217 | } else { |
— | — | @@ -260,10 +260,10 @@ |
261 | 261 | $params = $this->extractRequestParams(); |
262 | 262 | |
263 | 263 | $this->mShowVersions = $params['version']; |
264 | | - $action = $params['action']; |
| 264 | + $this->mAction = $params['action']; |
265 | 265 | |
266 | 266 | // 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); |
268 | 268 | |
269 | 269 | if (!$this->mInternalMode) { |
270 | 270 | |