mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-24 08:13:53 +00:00
e5cb34c058
* Move ApiFancyCaptchaReload.php into the FancyCaptcha subdir * Fix include of recaptchalib.php * Restore efReCaptcha() that was randomly deleted Bug: T100775 Bug: T100504 Bug: T100505 Change-Id: I70f9c3f1610fed5aa4b88f3512b86e1a40d64a6b
47 lines
967 B
PHP
47 lines
967 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;
|
|
}
|
|
|
|
/**
|
|
* @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',
|
|
);
|
|
}
|
|
}
|