Follow-ups to r56684: add a member function for extensions to add header text cleanly, and tweak variable names in api/ApiLogin.php.

This commit is contained in:
Happy-melon 2009-09-20 21:24:48 +00:00
parent d7ec2f9076
commit 2da3e35b51

View file

@ -151,11 +151,12 @@ class SimpleCaptcha {
wfDebug( "ConfirmEdit: user group allows skipping captcha on account creation\n" ); wfDebug( "ConfirmEdit: user group allows skipping captcha on account creation\n" );
return true; return true;
} }
$sp->mFormHeader .= $sp->addFormHeader(
"<div class='captcha'>" . "<div class='captcha'>" .
$wgOut->parse( $this->getMessage( 'createaccount' ) ) . $wgOut->parse( $this->getMessage( 'createaccount' ) ) .
$this->getForm() . $this->getForm() .
"</div>\n"; "</div>\n"
);
} }
return true; return true;
} }
@ -169,11 +170,12 @@ class SimpleCaptcha {
function injectUserLogin( &$sp ) { function injectUserLogin( &$sp ) {
if ( $this->isBadLoginTriggered() ) { if ( $this->isBadLoginTriggered() ) {
global $wgOut; global $wgOut;
$sp->mFormHeader .= $sp->addFormHeader(
"<div class='captcha'>" . "<div class='captcha'>" .
$wgOut->parse( $this->getMessage( 'badlogin' ) ) . $wgOut->parse( $this->getMessage( 'badlogin' ) ) .
$this->getForm() . $this->getForm() .
"</div>\n"; "</div>\n"
);
} }
return true; return true;
} }