mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-12-01 03:06:30 +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' ),
|
|
],
|
|
];
|
|
}
|
|
}
|