22 $this->captchaId = $id;
23 $this->captchaData = $data;
27 $success = parent::loadFromSubmission( $data );
30 $captcha = ConfirmEditHooks::getInstance();
31 $this->captchaData = $captcha->retrieveCaptcha( $this->captchaId );
32 if ( !$this->captchaData ) {
44 $captcha = ConfirmEditHooks::getInstance();
48 switch ( $this->action ) {
49 case AuthManager::ACTION_LOGIN:
52 case AuthManager::ACTION_CREATE:
60 'value' => $this->captchaId,
61 'label' =>
wfMessage(
'captcha-id-label' ),
66 'label' => $captcha->getMessage(
$action ),
67 'value' => $captcha->getCaptchaInfo( $this->captchaData, $this->captchaId ),
68 'help' =>
wfMessage(
'captcha-info-help' ),
81 $captcha = ConfirmEditHooks::getInstance();
82 return $captcha->describeCaptchaType();
86 $ret =
new static(
null, null );
87 foreach ( $data as $k => $v ) {
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
Generic captcha authentication request class.
string $captchaWord
Captcha solution submitted by the user.
string $captchaId
Identifier of the captcha.
getMetadata()
Returns metadata about this request.
getFieldInfo()
Fetch input field info.The field info is an associative array mapping field names to info arrays....
static __set_state( $data)
Implementing this mainly for use from the unit tests.
array $captchaData
Information about the captcha (e.g.
loadFromSubmission(array $data)
Initialize form submitted form data.