Merge "Made SwiftFileBackend::loadObjectListing() populate stat entries in reverse...
[lhc/web/wiklou.git] / includes / templates / Usercreate.php
index 541d9e4..28b5d79 100644 (file)
@@ -25,7 +25,9 @@
  * @defgroup Templates Templates
  */
 
-if( !defined( 'MEDIAWIKI' ) ) die( -1 );
+if ( !defined( 'MEDIAWIKI' ) ) {
+       die( -1 );
+}
 
 /**
  * @ingroup Templates
@@ -42,28 +44,36 @@ class UsercreateTemplate extends QuickTemplate {
        }
 
        function execute() {
-               if( $this->data['message'] ) {
+               if ( $this->data['message'] ) {
+?>
+       <div class="<?php $this->text( 'messagetype' ); ?>box">
+<?php
+                       if ( $this->data['messagetype'] == 'error' ) {
+                               ?><strong><?php $this->msg( 'loginerror' ); ?></strong><br /><?php
+                       }
+                       $this->html( 'message' );
 ?>
-       <div class="<?php $this->text('messagetype') ?>box">
-               <?php if ( $this->data['messagetype'] == 'error' ) { ?>
-                       <strong><?php $this->msg( 'loginerror' )?></strong><br />
-               <?php } ?>
-               <?php $this->html('message') ?>
        </div>
        <div class="visualClear"></div>
-<?php } ?>
+<?php
+               }
+?>
 
 <div id="signupstart"><?php $this->msgWiki( 'signupstart' ); ?></div>
 <div id="userlogin">
 
-<form name="userlogin2" id="userlogin2" method="post" action="<?php $this->text('action') ?>">
-       <h2><?php $this->msg('createaccount') ?></h2>
-       <p id="userloginlink"><?php $this->html('link') ?></p>
-       <?php $this->html('header'); /* pre-table point for form plugins... */ ?>
-       <?php if( $this->haveData( 'languages' ) ) { ?><div id="languagelinks"><p><?php $this->html( 'languages' ); ?></p></div><?php } ?>
+<form name="userlogin2" id="userlogin2" method="post" action="<?php $this->text( 'action' ); ?>">
+       <h2><?php $this->msg( 'createaccount' ); ?></h2>
+       <p id="userloginlink"><?php $this->html( 'link' ); ?></p>
+       <?php $this->html( 'header' ); /* pre-table point for form plugins... */ ?>
+<?php
+       if ( $this->haveData( 'languages' ) ) {
+               ?><div id="languagelinks"><p><?php $this->html( 'languages' ); ?></p></div><?php
+       }
+?>
        <table>
                <tr>
-                       <td class="mw-label"><label for='wpName2'><?php $this->msg('yourname') ?></label></td>
+                       <td class="mw-label"><label for='wpName2'><?php $this->msg( 'yourname' ); ?></label></td>
                        <td class="mw-input">
                                <?php
                        echo Html::input( 'wpName', $this->data['name'], 'text', array(
@@ -79,7 +89,8 @@ class UsercreateTemplate extends QuickTemplate {
                <tr>
                        <td></td>
                        <td class="mw-input">
-                               <?php if( $this->data['createemail'] ) {
+<?php
+                               if ( $this->data['createemail'] ) {
                                        echo Xml::checkLabel(
                                                wfMessage( 'createaccountmail' )->text(),
                                                'wpCreateaccountMail',
@@ -87,11 +98,12 @@ class UsercreateTemplate extends QuickTemplate {
                                                $this->data['createemailset'],
                                                array( 'tabindex' => '2' )
                                        );
-                               } ?>
+                               }
+?>
                        </td>
                </tr>
                <tr class="mw-row-password">
-                       <td class="mw-label"><label for='wpPassword2'><?php $this->msg('yourpassword') ?></label></td>
+                       <td class="mw-label"><label for='wpPassword2'><?php $this->msg( 'yourpassword' ); ?></label></td>
                        <td class="mw-input">
 <?php
                        echo Html::input( 'wpPassword', null, 'password', array(
@@ -102,24 +114,27 @@ class UsercreateTemplate extends QuickTemplate {
                        ) + User::passwordChangeInputAttribs() ); ?>
                        </td>
                </tr>
-       <?php if( $this->data['usedomain'] ) {
+<?php
+               if ( $this->data['usedomain'] ) {
                $doms = "";
-               foreach( $this->data['domainnames'] as $dom ) {
+               foreach ( $this->data['domainnames'] as $dom ) {
                        $doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
                }
-       ?>
+?>
                <tr id="mw-user-domain-section">
-                       <td class="mw-label"><?php $this->msg( 'yourdomainname' ) ?></td>
+                       <td class="mw-label"><?php $this->msg( 'yourdomainname' ); ?></td>
                        <td class="mw-input">
-                               <select name="wpDomain" value="<?php $this->text( 'domain' ) ?>"
+                               <select name="wpDomain" value="<?php $this->text( 'domain' ); ?>"
                                        tabindex="4">
                                        <?php echo $doms ?>
                                </select>
                        </td>
                </tr>
-       <?php } ?>
+<?php
+               }
+?>
                <tr class="mw-row-password">
-                       <td class="mw-label"><label for='wpRetype'><?php $this->msg('yourpasswordagain') ?></label></td>
+                       <td class="mw-label"><label for='wpRetype'><?php $this->msg( 'yourpasswordagain' ); ?></label></td>
                        <td class="mw-input">
                                <?php
                echo Html::input( 'wpRetype', null, 'password', array(
@@ -131,8 +146,10 @@ class UsercreateTemplate extends QuickTemplate {
                        </td>
                </tr>
                <tr>
-                       <?php if( $this->data['useemail'] ) { ?>
-                               <td class="mw-label"><label for='wpEmail'><?php $this->msg('youremail') ?></label></td>
+<?php
+               if ( $this->data['useemail'] ) {
+?>
+                               <td class="mw-label"><label for='wpEmail'><?php $this->msg( 'youremail' ); ?></label></td>
                                <td class="mw-input">
                                        <?php
                echo Html::input( 'wpEmail', $this->data['email'], 'email', array(
@@ -143,42 +160,52 @@ class UsercreateTemplate extends QuickTemplate {
                ) ); ?>
                                        <div class="prefsectiontip">
                                                <?php  // duplicated in Preferences.php profilePreferences()
-                                                       if( $this->data['emailrequired'] ) {
-                                                               $this->msgWiki('prefs-help-email-required');
+                                                       if ( $this->data['emailrequired'] ) {
+                                                               $this->msgWiki( 'prefs-help-email-required' );
                                                        } else {
-                                                               $this->msgWiki('prefs-help-email');
+                                                               $this->msgWiki( 'prefs-help-email' );
                                                        }
-                                                       if( $this->data['emailothers'] ) {
-                                                               $this->msgWiki('prefs-help-email-others');
+                                                       if ( $this->data['emailothers'] ) {
+                                                               $this->msgWiki( 'prefs-help-email-others' );
                                                        } ?>
                                        </div>
                                </td>
-                       <?php } ?>
-                       <?php if( $this->data['userealname'] ) { ?>
+<?php
+               }
+
+               if ( $this->data['userealname'] ) {
+?>
                                </tr>
                                <tr>
-                                       <td class="mw-label"><label for='wpRealName'><?php $this->msg('yourrealname') ?></label></td>
+                                       <td class="mw-label"><label for='wpRealName'><?php $this->msg( 'yourrealname' ); ?></label></td>
                                        <td class="mw-input">
                                                <input type='text' class='loginText' name="wpRealName" id="wpRealName"
                                                        tabindex="7"
-                                                       value="<?php $this->text('realname') ?>" size='20' />
+                                                       value="<?php $this->text( 'realname' ); ?>" size='20' />
                                                <div class="prefsectiontip">
-                                                       <?php $this->msgWiki('prefs-help-realname'); ?>
+                                                       <?php $this->msgWiki( 'prefs-help-realname' ); ?>
                                                </div>
                                        </td>
-                       <?php } ?>
-                       <?php if( $this->data['usereason'] ) { ?>
+<?php
+               }
+
+               if ( $this->data['usereason'] ) {
+?>
                                </tr>
                                <tr>
-                                       <td class="mw-label"><label for='wpReason'><?php $this->msg('createaccountreason') ?></label></td>
+                                       <td class="mw-label"><label for='wpReason'><?php $this->msg( 'createaccountreason' ); ?></label></td>
                                        <td class="mw-input">
                                                <input type='text' class='loginText' name="wpReason" id="wpReason"
                                                        tabindex="8"
-                                                       value="<?php $this->text('reason') ?>" size='20' />
+                                                       value="<?php $this->text( 'reason' ); ?>" size='20' />
                                        </td>
-                       <?php } ?>
+<?php
+               }
+?>
                </tr>
-               <?php if( $this->data['canremember'] ) { ?>
+<?php
+               if ( $this->data['canremember'] ) {
+?>
                <tr>
                        <td></td>
                        <td class="mw-input">
@@ -195,7 +222,8 @@ class UsercreateTemplate extends QuickTemplate {
                                ?>
                        </td>
                </tr>
-<?php   }
+<?php
+               }
 
                $tabIndex = 10;
                if ( isset( $this->data['extraInput'] ) && is_array( $this->data['extraInput'] ) ) {
@@ -205,13 +233,13 @@ class UsercreateTemplate extends QuickTemplate {
                                if ( !empty( $inputItem['msg'] ) && $inputItem['type'] != 'checkbox' ) {
                                        ?><td class="mw-label"><label for="<?php
                                        echo htmlspecialchars( $inputItem['name'] ); ?>"><?php
-                                       $this->msgWiki( $inputItem['msg'] ) ?></label><?php
+                                       $this->msgWiki( $inputItem['msg'] ); ?></label><?php
                                } else {
                                        ?><td><?php
                                }
                        ?></td>
                        <td class="mw-input">
-                               <input type="<?php echo htmlspecialchars( $inputItem['type'] ) ?>" name="<?php
+                               <input type="<?php echo htmlspecialchars( $inputItem['type'] ); ?>" name="<?php
                                echo htmlspecialchars( $inputItem['name'] ); ?>"
                                        tabindex="<?php echo $tabIndex++; ?>"
                                        value="<?php
@@ -222,20 +250,22 @@ class UsercreateTemplate extends QuickTemplate {
                                }
                                        ?>" id="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"
                                        <?php
-                               if ( $inputItem['type'] == 'checkbox' && !empty( $inputItem['value'] ) )
+                               if ( $inputItem['type'] == 'checkbox' && !empty( $inputItem['value'] ) ) {
                                        echo 'checked="checked"';
+                               }
                                        ?> /> <?php
                                        if ( $inputItem['type'] == 'checkbox' && !empty( $inputItem['msg'] ) ) {
                                                ?>
                                <label for="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"><?php
-                                       $this->msgHtml( $inputItem['msg'] ) ?></label><?php
+                                       $this->msgHtml( $inputItem['msg'] ); ?></label><?php
                                        }
-                               if( $inputItem['helptext'] !== false ) {
+                               if ( $inputItem['helptext'] !== false ) {
                                ?>
                                <div class="prefsectiontip">
                                        <?php $this->msgWiki( $inputItem['helptext'] ); ?>
-                               </div>
-                               <?php } ?>
+                               </div><?php
+                               }
+                               ?>
                        </td>
                </tr>
 <?php
@@ -247,12 +277,18 @@ class UsercreateTemplate extends QuickTemplate {
                        <td class="mw-submit">
                                <input type='submit' name="wpCreateaccount" id="wpCreateaccount"
                                        tabindex="<?php echo $tabIndex++; ?>"
-                                       value="<?php $this->msg('createaccount') ?>" />
+                                       value="<?php $this->msg( 'createaccount' ); ?>" />
                        </td>
                </tr>
        </table>
-<?php if( $this->haveData( 'uselang' ) ) { ?><input type="hidden" name="uselang" value="<?php $this->text( 'uselang' ); ?>" /><?php } ?>
-<?php if( $this->haveData( 'token' ) ) { ?><input type="hidden" name="wpCreateaccountToken" value="<?php $this->text( 'token' ); ?>" /><?php } ?>
+<?php
+       if ( $this->haveData( 'uselang' ) ) {
+               ?><input type="hidden" name="uselang" value="<?php $this->text( 'uselang' ); ?>" /><?php
+       }
+       if ( $this->haveData( 'token' ) ) {
+               ?><input type="hidden" name="wpCreateaccountToken" value="<?php $this->text( 'token' ); ?>" /><?php
+       }
+?>
 </form>
 </div>
 <div id="signupend"><?php $this->html( 'signupend' ); ?></div>