return true;
}
+ /**
+ * Indicates if this module requires edit mode
+ */
+ public function isEditMode() {
+ return false;
+ }
+
/**
* Profiling: total module execution time
$this->getResult()->addValue(null, $this->getModuleName(), $res);\r
}\r
\r
+ public function isEditMode() {\r
+ return true;\r
+ }\r
+\r
protected function getAllowedParams() {\r
return array (\r
'user' => null,\r
$this->getResult()->addValue(null, $this->getModuleName(), $r);\r
}\r
\r
+ public function isEditMode() {\r
+ return true;\r
+ }\r
+ \r
protected function getAllowedParams() {\r
return array (\r
'title' => null,\r
if ($this->mPrinter->getNeedsRawData())
$this->getResult()->setRawMode();
-
- if( $this->mAction == 'help' )
- $this->mPrinter->setHelp();
}
// Execute
* Override the parent to generate help messages for all available modules.
*/
public function makeHelpMsg() {
+ global $wgEnableWriteAPI;
+
+ $this->mPrinter->setHelp();
// Use parent to make default message for the main module
$msg = parent :: makeHelpMsg();
$msg .= "\n\n$astriks Modules $astriks\n\n";
foreach( $this->mModules as $moduleName => $unused ) {
$module = new $this->mModules[$moduleName] ($this, $moduleName);
+ if( !$wgEnableWriteAPI && $module->isEditMode() )
+ continue;
$msg .= self::makeHelpMsgHeader($module, 'action');
$msg2 = $module->makeHelpMsg();
if ($msg2 !== false)
$this->getResult()->addValue(null, $this->getModuleName(), $r);\r
}\r
\r
+ public function isEditMode() {\r
+ return true;\r
+ }\r
+ \r
protected function getAllowedParams() {\r
return array (\r
'from' => null,\r
$this->getResult()->addValue(null, $this->getModuleName(), $res);\r
}\r
\r
+ public function isEditMode() {\r
+ return true;\r
+ }\r
+ \r
protected function getAllowedParams() {\r
return array (\r
'title' => null,\r
$this->getResult()->addValue(null, $this->getModuleName(), $info);\r
}\r
\r
+ public function isEditMode() {\r
+ return true;\r
+ }\r
+ \r
protected function getAllowedParams() {\r
return array (\r
'title' => null,\r
$this->getResult()->addValue(null, $this->getModuleName(), $res);\r
}\r
\r
+ public function isEditMode() {\r
+ return true;\r
+ }\r
+ \r
protected function getAllowedParams() {\r
return array (\r
'id' => null,\r
$this->getResult()->addValue(null, $this->getModuleName(), $info);\r
}\r
\r
+ public function isEditMode() {\r
+ return true;\r
+ }\r
+ \r
protected function getAllowedParams() {\r
return array (\r
'title' => null,\r