mediawiki-extensions-Confir.../hCaptcha/includes/HCaptchaAuthenticationRequest.php
Reedy c1b67dc3c1 Correct namespacing to match best practices
Bug: T303105
Change-Id: I6df333dde64235bc0ee56cb27d28072bdead7612
2022-03-05 15:05:22 +00:00

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' ),
],
];
}
}