summaryrefslogtreecommitdiff
path: root/extensions/Gadgets/api/ApiQueryGadgets.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2015-06-04 07:31:04 +0200
committerPierre Schmitz <pierre@archlinux.de>2015-06-04 07:58:39 +0200
commitf6d65e533c62f6deb21342d4901ece24497b433e (patch)
treef28adf0362d14bcd448f7b65a7aaf38650f923aa /extensions/Gadgets/api/ApiQueryGadgets.php
parentc27b2e832fe25651ef2410fae85b41072aae7519 (diff)
Update to MediaWiki 1.25.1
Diffstat (limited to 'extensions/Gadgets/api/ApiQueryGadgets.php')
-rw-r--r--extensions/Gadgets/api/ApiQueryGadgets.php29
1 files changed, 27 insertions, 2 deletions
diff --git a/extensions/Gadgets/api/ApiQueryGadgets.php b/extensions/Gadgets/api/ApiQueryGadgets.php
index b6b00515..46535964 100644
--- a/extensions/Gadgets/api/ApiQueryGadgets.php
+++ b/extensions/Gadgets/api/ApiQueryGadgets.php
@@ -186,10 +186,16 @@ class ApiQueryGadgets extends ApiQueryBase {
);
}
+ /**
+ * @deprecated since MediaWiki core 1.25
+ */
public function getDescription() {
return 'Returns a list of gadgets used on this wiki';
}
+ /**
+ * @deprecated since MediaWiki core 1.25
+ */
public function getParamDescription() {
return array(
'prop' => array(
@@ -205,6 +211,9 @@ class ApiQueryGadgets extends ApiQueryBase {
);
}
+ /**
+ * @deprecated since MediaWiki core 1.25
+ */
public function getExamples() {
$params = $this->getAllowedParams();
$allProps = implode( '|', $params['prop'][ApiBase::PARAM_TYPE] );
@@ -222,7 +231,23 @@ class ApiQueryGadgets extends ApiQueryBase {
);
}
- public function getVersion() {
- return __CLASS__ . ': $Id$';
+ /**
+ * @see ApiBase::getExamplesMessages()
+ */
+ protected function getExamplesMessages() {
+ $params = $this->getAllowedParams();
+ $allProps = implode( '|', $params['prop'][ApiBase::PARAM_TYPE] );
+ return array(
+ 'action=query&list=gadgets&gaprop=id|desc'
+ => 'apihelp-query+gadgets-example-1',
+ "action=query&list=gadgets&gaprop=$allProps"
+ => 'apihelp-query+gadgets-example-2',
+ 'action=query&list=gadgets&gacategories=foo'
+ => 'apihelp-query+gadgets-example-3',
+ 'action=query&list=gadgets&gaids=foo|bar&gaprop=id|desc|metadata'
+ => 'apihelp-query+gadgets-example-4',
+ 'action=query&list=gadgets&gaenabledonly'
+ => 'apihelp-query+gadgets-example-5',
+ );
}
}