* (bug 13049) "API must be accessed from the primary script entry point" error
* (bug 18601) generator=backlinks returns invalid continue parameter
* (bug 18597) Internal error with empty generator= parameter
+* (bug 16422) Don't display help for format=jsonfm unless specifically requested
=== Languages updated in 1.15 ===
public function getIsHtml() {
return $this->mIsHtml;
}
+
+ /**
+ * Whether this formatter can format the help message in a nice way.
+ * By default, this returns the same as getIsHtml().
+ * When action=help is set explicitly, the help will always be shown
+ * @return bool
+ */
+ public function getWantsHelp() {
+ return $this->getIsHtml();
+ }
/**
* Initialize the printer function and prepare the output headers, etc.
public function getNeedsRawData() {
return $this->mIsRaw;
}
+
+ public function getWantsHelp() {
+ // Help is always ugly in JSON
+ return false;
+ }
public function execute() {
$prefix = $suffix = "";
'info' => $e->getMessage());
// Only print the help message when this is for the developer, not runtime
- if ($this->mPrinter->getIsHtml() || $this->mAction == 'help')
+ if ($this->mPrinter->getWantsHelp() || $this->mAction == 'help')
ApiResult :: setContent($errMessage, $this->makeHelpMsg());
} else {