up as a redirect to the linked page on Special:Whatlinkshere.
* (bug 32609) API: Move captchaid/captchaword of action=edit from core
to Captcha extension(s)
+* Added 'ApiGetDescription' hook.
=== Languages updated in 1.19 ===
&$resultArr : data in this array will be added to the API result
'APIGetAllowedParams': use this hook to modify a module's parameters.
-&$module: Module object
+&$module: ApiBase Module object
&$params: Array of parameters
+'APIGetDescription': use this hook to modify a module's description
+&$module: ApiBase Module object
+&$desc: Array of descriptions
+
'APIGetParamDescription': use this hook to modify a module's parameter
descriptions.
-&$module: Module object
+&$module: ApiBase Module object
&$desc: Array of parameter descriptions
'APIQueryAfterExecute': after calling the execute() method of an
public function makeHelpMsg() {
static $lnPrfx = "\n ";
- $msg = $this->getDescription();
+ $msg = $this->getFinalDescription();
if ( $msg !== false ) {
/**
* Get final list of parameters, after hooks have had a chance to
* tweak it as needed.
+ *
* @return array or false
*/
public function getFinalParams() {
}
/**
- * Get final description, after hooks have had a chance to tweak it as
+ * Get final parameter descriptions, after hooks have had a chance to tweak it as
* needed.
+ *
* @return array
*/
public function getFinalParamDescription() {
return $desc;
}
+ /**
+ * Get final module description, after hooks have had a chance to tweak it as
+ * needed.
+ *
+ * @return array
+ */
+ public function getFinalDescription() {
+ $desc = $this->getDescription();
+ wfRunHooks( 'ApiGetDescription', array( &$this, &$desc ) );
+ return $desc;
+ }
+
/**
* This method mangles parameter name based on the prefix supplied to the constructor.
* Override this method to change parameter name during runtime
function getClassInfo( $obj ) {
$result = $this->getResult();
$retval['classname'] = get_class( $obj );
- $retval['description'] = implode( "\n", (array)$obj->getDescription() );
+ $retval['description'] = implode( "\n", (array)$obj->getFinalDescription() );
$examples = (array)$obj->getExamples();
$retval['examples'] = implode( "\n", $examples );
$retval['version'] = implode( "\n", (array)$obj->getVersion() );