r55445 MediaWiki - Code Review archive
Repository:
MediaWiki
Revision:
<
r55444
|
r55445
|
r55446
>
Date:
21:35, 21 August 2009
Author:
simetrical
Status:
ok
Tags:
Comment:
Autofocus password, not name, if name is prefilled
Modified paths:
/trunk/phase3/includes/templates/Userlogin.php
(modified) (
history
)
Diff
[
purge
]
Index: trunk/phase3/includes/templates/Userlogin.php
—
—
@@ -41,9 +41,10 @@
42
42
'id' => 'wpName1',
43
43
'tabindex' => '1',
44
44
'size' => '20',
45
- 'required',
46
- 'autofocus'
47
- ) ); ?>
45
+ 'required'
46
+ # Can't do + array( 'autofocus' ) because + for arrays in PHP
47
+ # only works right for associative arrays! Thanks, PHP.
48
+ ) + ( $this->data['name'] ? array() : array( 'autofocus' => '' ) ) ); ?>
48
49
49
50
</td>
50
51
</tr>
—
—
@@ -56,7 +57,7 @@
57
58
'id' => 'wpPassword1',
58
59
'tabindex' => '2',
59
60
'size' => '20'
60
- ) ); ?>
61
+ ) + ( $this->data['name'] ? array( 'autofocus' ) : array() ) ); ?>
61
62
62
63
</td>
63
64
</tr>
Status & tagging log
17:35, 10 September 2009
Brion VIBBER
(
talk
|
contribs
)
changed the
status
of r55445
[
removed:
new
added:
ok]