mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-15 11:59:33 +00:00
d80a768c97
Some servers (mine apparently) disable short_open_tag which causes this to break and output the PHP file as plain text. Scanned repo for other uses, this is the last one. Change-Id: Ic86ae887098fc92bad8128e7ef4f0f4b782d7a1c
35 lines
729 B
PHP
35 lines
729 B
PHP
<?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;
|
|
}
|
|
|
|
public function getDescription() {
|
|
return 'Get a new FancyCaptcha.';
|
|
}
|
|
|
|
public function getAllowedParams() {
|
|
return array();
|
|
}
|
|
|
|
public function getParamDescription() {
|
|
return array();
|
|
}
|
|
|
|
public function getExamples() {
|
|
return array( 'api.php?action=fancycaptchareload&format=xml' );
|
|
}
|
|
}
|