Merge "Fix separated login link so that create account and login are always next...
[lhc/web/wiklou.git] / includes / templates / Userlogin.php
index efe826f..a3f6a38 100644 (file)
@@ -1,6 +1,21 @@
 <?php
 /**
- * Html form for user login
+ * Html form for user login.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
  *
  * @file
  * @ingroup Templates
@@ -93,9 +108,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'],
@@ -111,7 +127,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'],
@@ -125,7 +141,7 @@ 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'
                ) );
@@ -138,10 +154,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'
+                                       )
+                               );
                        }
                } ?>