r12978 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r12977‎ | r12978 | r12979 >
Date:02:53, 8 February 2006
Author:vibber
Status:old
Tags:
Comment:
Separate the two input bits into two forms so 'enter' picks the right button in Firefox.
Fix a PHP warning from my stupid typo.
Modified paths:
  • /trunk/extensions/CheckUser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CheckUser.php
@@ -55,16 +55,23 @@
5656 $encUser = htmlspecialchars( $user );
5757
5858 $wgOut->addHTML( <<<EOT
 59+<table border=0 cellpadding=5>
5960 <form name="checkuser" action="$action" method=post>
60 -<table border=0 cellpadding=5><tr><td>
 61+<tr><td>
6162 IP:
6263 </td><td>
6364 <input type="text" name="ip" value="$encIp" width=50 /> <input type="submit" name="subip" value="OK" />
64 -</td></tr><tr><td>
 65+</td></tr>
 66+</form>
 67+
 68+<form name="checkuser" action="$action" method=post>
 69+<tr><td>
6570 User:
6671 </td><td>
6772 <input type="text" name="user" value="$encUser" width=50 /> <input type="submit" name="subuser" value="OK" />
68 -</td></tr></table>
 73+</td></tr>
 74+</form>
 75+</table>
6976 EOT
7077 );
7178 }
@@ -110,7 +117,6 @@
111118 * @return array conditions
112119 */
113120 function getIpConds( $db, $ip ) {
114 - $split = explode( $ip, '/', 2 );
115121 // haaaack
116122 if( preg_match( '#^(\d+)\.(\d+)\.(\d+)\.(\d+)/(\d+)$#', $ip, $matches ) ) {
117123 list( $junk, $a, $b, $c, $d, $bits ) = $matches;

Status & tagging log