r75037 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75036‎ | r75037 | r75038 >
Date:21:02, 19 October 2010
Author:platonides
Status:ok (Comments)
Tags:
Comment:
Remove PHP Notice: Undefined index: usedomain in phase3/includes/templates/Userlogin.php on line 70
Add extradata data for adding fields from an extension.
Modified paths:
  • /trunk/phase3/includes/templates/Userlogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/templates/Userlogin.php
@@ -67,7 +67,7 @@
6868
6969 </td>
7070 </tr>
71 - <?php if( $this->data['usedomain'] ) {
 71+ <?php if( isset( $this->data['usedomain'] ) && $this->data['usedomain'] ) {
7272 $doms = "";
7373 foreach( $this->data['domainnames'] as $dom ) {
7474 $doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
@@ -83,6 +83,11 @@
8484 </td>
8585 </tr>
8686 <?php }
 87+
 88+ if( $this->haveData( 'extrafields' ) ) {
 89+ echo $this->data['extrafields'];
 90+ }
 91+
8792 if( $this->data['canremember'] ) { ?>
8893 <tr>
8994 <td></td>
@@ -94,7 +99,7 @@
95100 'wpRemember',
96101 'wpRemember',
97102 $this->data['remember'],
98 - array( 'tabindex' => '4' )
 103+ array( 'tabindex' => '8' )
99104 )
100105 ?>
101106 </td>
@@ -106,13 +111,13 @@
107112 <?php
108113 echo Html::input( 'wpLoginAttempt', wfMsg( 'login' ), 'submit', array(
109114 'id' => 'wpLoginAttempt',
110 - 'tabindex' => '5'
 115+ 'tabindex' => '9'
111116 ) );
112117 if ( $this->data['useemail'] && $this->data['canreset'] ) {
113118 echo '&#160;';
114119 echo Html::input( 'wpMailmypassword', wfMsg( 'mailmypassword' ), 'submit', array(
115120 'id' => 'wpMailmypassword',
116 - 'tabindex' => '6'
 121+ 'tabindex' => '10'
117122 ) );
118123 } ?>
119124

Comments

#Comment by Happy-melon (talk | contribs)   21:35, 14 December 2010

Why the arbitrary change to the tabindex? I assume this is because you want to add four extra fields, but why only four?

#Comment by Platonides (talk | contribs)   22:02, 14 December 2010

This is a backend change for r78403.

I don't know why I increased it in 4 units and not in another value. It problably looked a good number. You are right in that it is arbitrary. I could as well have changed it to 94.

#Comment by Happy-melon (talk | contribs)   16:25, 17 December 2010

This whole setup needs killing with fire (I'll get there eventually... :D).

Status & tagging log