summaryrefslogtreecommitdiff
path: root/extensions/Gadgets/api
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
parentc27b2e832fe25651ef2410fae85b41072aae7519 (diff)
Update to MediaWiki 1.25.1
Diffstat (limited to 'extensions/Gadgets/api')
-rw-r--r--extensions/Gadgets/api/ApiQueryGadgetCategories.php21
-rw-r--r--extensions/Gadgets/api/ApiQueryGadgets.php29
2 files changed, 46 insertions, 4 deletions
diff --git a/extensions/Gadgets/api/ApiQueryGadgetCategories.php b/extensions/Gadgets/api/ApiQueryGadgetCategories.php
index 73628085..23257f12 100644
--- a/extensions/Gadgets/api/ApiQueryGadgetCategories.php
+++ b/extensions/Gadgets/api/ApiQueryGadgetCategories.php
@@ -88,10 +88,16 @@ class ApiQueryGadgetCategories extends ApiQueryBase {
);
}
+ /**
+ * @deprecated since MediaWiki core 1.25
+ */
public function getDescription() {
return 'Returns a list of gadget categories';
}
+ /**
+ * @deprecated since MediaWiki core 1.25
+ */
public function getParamDescription() {
return array(
'prop' => array(
@@ -104,6 +110,9 @@ class ApiQueryGadgetCategories extends ApiQueryBase {
);
}
+ /**
+ * @deprecated since MediaWiki core 1.25
+ */
public function getExamples() {
$params = $this->getAllowedParams();
$allProps = implode( '|', $params['prop'][ApiBase::PARAM_TYPE] );
@@ -116,7 +125,15 @@ class ApiQueryGadgetCategories extends ApiQueryBase {
);
}
- public function getVersion() {
- return __CLASS__ . ': $Id$';
+ /**
+ * @see ApiBase::getExamplesMessages()
+ */
+ protected function getExamplesMessages() {
+ return array(
+ 'action=query&list=gadgetcategories'
+ => 'apihelp-query+gadgetcategories-example-1',
+ 'action=query&list=gadgetcategories&gcnames=foo|bar&gcprop=name|title|members'
+ => 'apihelp-query+gadgetcategories-example-2',
+ );
}
}
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',
+ );
}
}