summaryrefslogtreecommitdiff
path: root/extensions/ConfirmEdit/FancyCaptcha
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2015-08-16 08:22:05 +0200
committerPierre Schmitz <pierre@archlinux.de>2015-08-16 08:22:05 +0200
commit1a365e77dfb8825136626202b1df462731b42060 (patch)
tree1dc4468eaabf070e051e790a9e67a9a9a2c63d99 /extensions/ConfirmEdit/FancyCaptcha
parenta72fd280f7acb4d2a1ba579a0f1b2b2ae8958530 (diff)
Update to MediaWiki 1.25.2
Diffstat (limited to 'extensions/ConfirmEdit/FancyCaptcha')
-rw-r--r--extensions/ConfirmEdit/FancyCaptcha/ApiFancyCaptchaReload.php46
-rw-r--r--extensions/ConfirmEdit/FancyCaptcha/extension.json4
2 files changed, 47 insertions, 3 deletions
diff --git a/extensions/ConfirmEdit/FancyCaptcha/ApiFancyCaptchaReload.php b/extensions/ConfirmEdit/FancyCaptcha/ApiFancyCaptchaReload.php
new file mode 100644
index 00000000..8cd28631
--- /dev/null
+++ b/extensions/ConfirmEdit/FancyCaptcha/ApiFancyCaptchaReload.php
@@ -0,0 +1,46 @@
+<?php
+/**
+ * Api module to reload FancyCaptcha
+ *
+ * @ingroup API
+ * @ingroup Extensions
+ */
+class ApiFancyCaptchaReload extends ApiBase {
+ public function execute() {
+ # Get a new FancyCaptcha form data
+ $captcha = new FancyCaptcha();
+ $captchaIndex = $captcha->getCaptchaIndex();
+
+ $result = $this->getResult();
+ $result->addValue( null, $this->getModuleName(), array ( 'index' => $captchaIndex ) );
+ return true;
+ }
+
+ /**
+ * @deprecated since MediaWiki core 1.25
+ */
+ public function getDescription() {
+ return 'Get a new FancyCaptcha.';
+ }
+
+ public function getAllowedParams() {
+ return array();
+ }
+
+ /**
+ * @deprecated since MediaWiki core 1.25
+ */
+ public function getExamples() {
+ return array( 'api.php?action=fancycaptchareload&format=xml' );
+ }
+
+ /**
+ * @see ApiBase::getExamplesMessages()
+ */
+ protected function getExamplesMessages() {
+ return array(
+ 'action=fancycaptchareload'
+ => 'apihelp-fancycaptchareload-example-1',
+ );
+ }
+}
diff --git a/extensions/ConfirmEdit/FancyCaptcha/extension.json b/extensions/ConfirmEdit/FancyCaptcha/extension.json
index 11b877be..dba07d9b 100644
--- a/extensions/ConfirmEdit/FancyCaptcha/extension.json
+++ b/extensions/ConfirmEdit/FancyCaptcha/extension.json
@@ -38,9 +38,7 @@
"localBasePath": "resources",
"remoteExtPath": "ConfirmEdit/FancyCaptcha/resources"
},
- "callback": [
- "ConfirmEditHooks::onFancyCaptchaSetup"
- ],
+ "callback": "ConfirmEditHooks::onFancyCaptchaSetup",
"config": {
"CaptchaClass": "FancyCaptcha",
"CaptchaFileBackend": "",