Use PHP 7 '??' operator instead of if-then-else
[lhc/web/wiklou.git] / includes / specialpage / LoginSignupSpecialPage.php
index e94f3db..99a5a9a 100644 (file)
@@ -611,7 +611,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
                        $benefitList = '';
                        for ( $benefitIdx = 1; $benefitIdx <= $benefitCount; $benefitIdx++ ) {
                                $headUnescaped = $this->msg( "createacct-benefit-head$benefitIdx" )->text();
-                               $iconClass = $this->msg( "createacct-benefit-icon$benefitIdx" )->escaped();
+                               $iconClass = $this->msg( "createacct-benefit-icon$benefitIdx" )->text();
                                $benefitList .= Html::rawElement( 'div', [ 'class' => "mw-number-text $iconClass" ],
                                        Html::rawElement( 'h3', [],
                                                $this->msg( "createacct-benefit-head$benefitIdx" )->escaped()
@@ -824,12 +824,12 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
 
                // Both Hooks::run are explicit here to make findHooks.php happy
                if ( $this->isSignup() ) {
-                       Hooks::run( 'UserCreateForm', [ &$template ] );
+                       Hooks::run( 'UserCreateForm', [ &$template ], '1.27' );
                        if ( $oldTemplate !== $template ) {
                                wfDeprecated( "reference in UserCreateForm hook", '1.27' );
                        }
                } else {
-                       Hooks::run( 'UserLoginForm', [ &$template ] );
+                       Hooks::run( 'UserLoginForm', [ &$template ], '1.27' );
                        if ( $oldTemplate !== $template ) {
                                wfDeprecated( "reference in UserLoginForm hook", '1.27' );
                        }
@@ -1127,7 +1127,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
                        if ( !$signupendMsg->isDisabled() ) {
                                $usingHTTPS = $this->getRequest()->getProtocol() === 'https';
                                $signupendText = ( $usingHTTPS && !$signupendHttpsMsg->isBlank() )
-                                       ? $signupendHttpsMsg ->parse() : $signupendMsg->parse();
+                                       ? $signupendHttpsMsg->parse() : $signupendMsg->parse();
                                $fieldDefinitions['signupend'] = [
                                        'type' => 'info',
                                        'raw' => true,