summaryrefslogtreecommitdiff
path: root/includes/templates
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-08-12 09:28:15 +0200
committerPierre Schmitz <pierre@archlinux.de>2013-08-12 09:28:15 +0200
commit08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 (patch)
tree577a29fb579188d16003a209ce2a2e9c5b0aa2bd /includes/templates
parentcacc939b34e315b85e2d72997811eb6677996cc1 (diff)
Update to MediaWiki 1.21.1
Diffstat (limited to 'includes/templates')
-rw-r--r--includes/templates/NoLocalSettings.php4
-rw-r--r--includes/templates/Usercreate.php58
-rw-r--r--includes/templates/Userlogin.php4
3 files changed, 38 insertions, 28 deletions
diff --git a/includes/templates/NoLocalSettings.php b/includes/templates/NoLocalSettings.php
index bf5c487a..2483e58c 100644
--- a/includes/templates/NoLocalSettings.php
+++ b/includes/templates/NoLocalSettings.php
@@ -21,6 +21,10 @@
* @ingroup Templates
*/
+if ( !defined( 'MEDIAWIKI' ) ) {
+ die( "NoLocalSettings.php is not a valid MediaWiki entry point\n" );
+}
+
if ( !isset( $wgVersion ) ) {
$wgVersion = 'VERSION';
}
diff --git a/includes/templates/Usercreate.php b/includes/templates/Usercreate.php
index 98727f17..541d9e40 100644
--- a/includes/templates/Usercreate.php
+++ b/includes/templates/Usercreate.php
@@ -40,7 +40,7 @@ class UsercreateTemplate extends QuickTemplate {
'helptext' => $helptext,
);
}
-
+
function execute() {
if( $this->data['message'] ) {
?>
@@ -77,13 +77,27 @@ class UsercreateTemplate extends QuickTemplate {
</td>
</tr>
<tr>
+ <td></td>
+ <td class="mw-input">
+ <?php if( $this->data['createemail'] ) {
+ echo Xml::checkLabel(
+ wfMessage( 'createaccountmail' )->text(),
+ 'wpCreateaccountMail',
+ 'wpCreateaccountMail',
+ $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-input">
<?php
echo Html::input( 'wpPassword', null, 'password', array(
'class' => 'loginPassword',
'id' => 'wpPassword2',
- 'tabindex' => '2',
+ 'tabindex' => '3',
'size' => '20'
) + User::passwordChangeInputAttribs() ); ?>
</td>
@@ -94,24 +108,24 @@ class UsercreateTemplate extends QuickTemplate {
$doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
}
?>
- <tr>
+ <tr id="mw-user-domain-section">
<td class="mw-label"><?php $this->msg( 'yourdomainname' ) ?></td>
<td class="mw-input">
<select name="wpDomain" value="<?php $this->text( 'domain' ) ?>"
- tabindex="3">
+ tabindex="4">
<?php echo $doms ?>
</select>
</td>
</tr>
<?php } ?>
- <tr>
+ <tr class="mw-row-password">
<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(
'class' => 'loginPassword',
'id' => 'wpRetype',
- 'tabindex' => '4',
+ 'tabindex' => '5',
'size' => '20'
) + User::passwordChangeInputAttribs() ); ?>
</td>
@@ -124,7 +138,7 @@ class UsercreateTemplate extends QuickTemplate {
echo Html::input( 'wpEmail', $this->data['email'], 'email', array(
'class' => 'loginText',
'id' => 'wpEmail',
- 'tabindex' => '5',
+ 'tabindex' => '6',
'size' => '20'
) ); ?>
<div class="prefsectiontip">
@@ -146,7 +160,7 @@ class UsercreateTemplate extends QuickTemplate {
<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="6"
+ tabindex="7"
value="<?php $this->text('realname') ?>" size='20' />
<div class="prefsectiontip">
<?php $this->msgWiki('prefs-help-realname'); ?>
@@ -159,7 +173,7 @@ class UsercreateTemplate extends QuickTemplate {
<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="7"
+ tabindex="8"
value="<?php $this->text('reason') ?>" size='20' />
</td>
<?php } ?>
@@ -176,20 +190,20 @@ class UsercreateTemplate extends QuickTemplate {
'wpRemember',
'wpRemember',
$this->data['remember'],
- array( 'tabindex' => '8' )
+ array( 'tabindex' => '9' )
)
?>
</td>
</tr>
<?php }
- $tabIndex = 9;
+ $tabIndex = 10;
if ( isset( $this->data['extraInput'] ) && is_array( $this->data['extraInput'] ) ) {
foreach ( $this->data['extraInput'] as $inputItem ) { ?>
<tr>
- <?php
+ <?php
if ( !empty( $inputItem['msg'] ) && $inputItem['type'] != 'checkbox' ) {
- ?><td class="mw-label"><label for="<?php
+ ?><td class="mw-label"><label for="<?php
echo htmlspecialchars( $inputItem['name'] ); ?>"><?php
$this->msgWiki( $inputItem['msg'] ) ?></label><?php
} else {
@@ -200,17 +214,17 @@ class UsercreateTemplate extends QuickTemplate {
<input type="<?php echo htmlspecialchars( $inputItem['type'] ) ?>" name="<?php
echo htmlspecialchars( $inputItem['name'] ); ?>"
tabindex="<?php echo $tabIndex++; ?>"
- value="<?php
+ value="<?php
if ( $inputItem['type'] != 'checkbox' ) {
echo htmlspecialchars( $inputItem['value'] );
} else {
echo '1';
- }
+ }
?>" id="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"
- <?php
+ <?php
if ( $inputItem['type'] == 'checkbox' && !empty( $inputItem['value'] ) )
- echo 'checked="checked"';
- ?> /> <?php
+ echo 'checked="checked"';
+ ?> /> <?php
if ( $inputItem['type'] == 'checkbox' && !empty( $inputItem['msg'] ) ) {
?>
<label for="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"><?php
@@ -224,8 +238,7 @@ class UsercreateTemplate extends QuickTemplate {
<?php } ?>
</td>
</tr>
-<?php
-
+<?php
}
}
?>
@@ -235,11 +248,6 @@ class UsercreateTemplate extends QuickTemplate {
<input type='submit' name="wpCreateaccount" id="wpCreateaccount"
tabindex="<?php echo $tabIndex++; ?>"
value="<?php $this->msg('createaccount') ?>" />
- <?php if( $this->data['createemail'] ) { ?>
- <input type='submit' name="wpCreateaccountMail" id="wpCreateaccountMail"
- tabindex="<?php echo $tabIndex++; ?>"
- value="<?php $this->msg('createaccountmail') ?>" />
- <?php } ?>
</td>
</tr>
</table>
diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php
index a3f6a38b..7bc0241a 100644
--- a/includes/templates/Userlogin.php
+++ b/includes/templates/Userlogin.php
@@ -25,8 +25,6 @@
* @defgroup Templates Templates
*/
-if( !defined( 'MEDIAWIKI' ) ) die( -1 );
-
/**
* HTML template for Special:Userlogin form
* @ingroup Templates
@@ -146,7 +144,7 @@ class UserloginTemplate extends QuickTemplate {
'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' ),