mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-14 19:30:11 +00:00
c1b67dc3c1
Bug: T303105 Change-Id: I6df333dde64235bc0ee56cb27d28072bdead7612
36 lines
726 B
PHP
36 lines
726 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\ConfirmEdit\hCaptcha;
|
|
|
|
use CaptchaAuthenticationRequest;
|
|
use MediaWiki\Auth\AuthenticationRequest;
|
|
|
|
class HCaptchaAuthenticationRequest extends CaptchaAuthenticationRequest {
|
|
public function __construct() {
|
|
parent::__construct( '', [] );
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function loadFromSubmission( array $data ) {
|
|
// unhack the hack in parent
|
|
return AuthenticationRequest::loadFromSubmission( $data );
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function getFieldInfo() {
|
|
$fieldInfo = parent::getFieldInfo();
|
|
|
|
return [
|
|
'captchaWord' => [
|
|
'type' => 'string',
|
|
'label' => $fieldInfo['captchaInfo']['label'],
|
|
'help' => \wfMessage( 'hcaptcha-help' ),
|
|
],
|
|
];
|
|
}
|
|
}
|