Merge "Force case-sensitivity on the LIKE operator, to ensure similar behaviour betwe...
[lhc/web/wiklou.git] / includes / templates / Userlogin.php
index 5a2c633..7bc0241 100644 (file)
@@ -25,8 +25,6 @@
  * @defgroup Templates Templates
  */
 
-if( !defined( 'MEDIAWIKI' ) ) die( -1 );
-
 /**
  * HTML template for Special:Userlogin form
  * @ingroup Templates
@@ -108,9 +106,10 @@ class UserloginTemplate extends QuickTemplate {
                        <td></td>
                        <td class="mw-input">
                                <?php
-                               global $wgCookieExpiration, $wgLang;
+                               global $wgCookieExpiration;
+                               $expirationDays = ceil( $wgCookieExpiration / ( 3600 * 24 ) );
                                echo Xml::checkLabel(
-                                       wfMsgExt( 'remembermypassword', 'parsemag', $wgLang->formatNum( ceil( $wgCookieExpiration / ( 3600 * 24 ) ) ) ),
+                                       wfMessage( 'remembermypassword' )->numParams( $expirationDays )->text(),
                                        'wpRemember',
                                        'wpRemember',
                                        $this->data['remember'],
@@ -126,7 +125,7 @@ class UserloginTemplate extends QuickTemplate {
                        <td class="mw-input">
                        <?php
                        echo Xml::checkLabel(
-                               wfMsg( 'securelogin-stick-https' ),
+                               wfMessage( 'securelogin-stick-https' )->text(),
                                'wpStickHTTPS',
                                'wpStickHTTPS',
                                $this->data['stickHTTPS'],
@@ -140,12 +139,12 @@ class UserloginTemplate extends QuickTemplate {
                        <td></td>
                        <td class="mw-submit">
                                <?php
-               echo Html::input( 'wpLoginAttempt', wfMsg( 'login' ), 'submit', array(
+               echo Html::input( 'wpLoginAttempt', wfMessage( 'login' )->text(), 'submit', array(
                        'id' => 'wpLoginAttempt',
                        'tabindex' => '9'
                ) );
                if ( $this->data['useemail'] && $this->data['canreset'] ) {
-                       if( $this->data['resetlink'] === true ){
+                       if( $this->data['resetlink'] === true ) {
                                echo '&#160;';
                                echo Linker::link(
                                        SpecialPage::getTitleFor( 'PasswordReset' ),
@@ -153,10 +152,14 @@ class UserloginTemplate extends QuickTemplate {
                                );
                        } elseif( $this->data['resetlink'] === null ) {
                                echo '&#160;';
-                               echo Html::input( 'wpMailmypassword', wfMsg( 'mailmypassword' ), 'submit', array(
-                                       'id' => 'wpMailmypassword',
-                                       'tabindex' => '10'
-                               ) );
+                               echo Html::input(
+                                       'wpMailmypassword',
+                                       wfMessage( 'mailmypassword' )->text(),
+                                       'submit', array(
+                                               'id' => 'wpMailmypassword',
+                                               'tabindex' => '10'
+                                       )
+                               );
                        }
                } ?>