Index: trunk/extensions/CheckUser/CheckUser_body.php |
— | — | @@ -146,7 +146,7 @@ |
147 | 147 | } |
148 | 148 | |
149 | 149 | $dbr = wfGetDB( DB_SLAVE ); |
150 | | - |
| 150 | + # Limit added for browser limitations and to avoid time outs |
151 | 151 | $ip_conds = $this->getIpConds( $dbr, $ip, $xfor ); |
152 | 152 | $res = $dbr->select( 'cu_changes', '*', $ip_conds, $fname, |
153 | 153 | array( 'ORDER BY' => 'cuc_timestamp DESC', 'LIMIT' => 5000 ) ); |
— | — | @@ -326,10 +326,13 @@ |
327 | 327 | $users_first = $users_last = $users_edits = $users_ids = array(); |
328 | 328 | |
329 | 329 | $dbr = wfGetDB( DB_SLAVE ); |
330 | | - |
| 330 | + # Limit cap made to stop nasty timeouts |
331 | 331 | $ip_conds = $this->getIpConds( $dbr, $ip, $xfor ); |
332 | | - $res = $dbr->select( 'cu_changes', array( 'cuc_user_text', 'cuc_timestamp', 'cuc_user', 'cuc_ip', 'cuc_agent', 'cuc_xff' ), |
333 | | - $ip_conds, $fname, array( 'ORDER BY' => 'cuc_timestamp DESC' ) ); |
| 332 | + $res = $dbr->select( 'cu_changes', |
| 333 | + array( 'cuc_user_text', 'cuc_timestamp', 'cuc_user', 'cuc_ip', 'cuc_agent', 'cuc_xff' ), |
| 334 | + $ip_conds, |
| 335 | + $fname, |
| 336 | + array( 'ORDER BY' => 'cuc_timestamp DESC', 'LIMIT' => 10,000 ) ); |
334 | 337 | |
335 | 338 | if( !$dbr->numRows( $res ) ) { |
336 | 339 | $s = wfMsgHtml( "checkuser-nomatch" )."\n"; |
— | — | @@ -366,9 +369,11 @@ |
367 | 370 | $s = '<ul>'; |
368 | 371 | foreach( $users_edits as $name => $count ) { |
369 | 372 | $s .= '<li>'; |
370 | | - $s .= $sk->userLink( -1 , $name ) . $sk->userToolLinks( -1 , $name ); // hack, ALWAYS show contribs links |
371 | | - $s .= ' (<a href="' . $wgTitle->escapeLocalURL( 'user=' . urlencode( $name ) ) . '">' . wfMsgHtml('checkuser-check') . '</a>)'; |
372 | | - $s .= ' (' . $wgLang->timeanddate( $users_first[$name], true ) . ' -- ' . $wgLang->timeanddate( $users_last[$name], true ) . ') '; |
| 373 | + $s .= $sk->userLink( -1 , $name ) . $sk->userToolLinks( -1 , $name ); |
| 374 | + $s .= ' (<a href="' . $wgTitle->escapeLocalURL( 'user=' . urlencode( $name ) ) . |
| 375 | + '">' . wfMsgHtml('checkuser-check') . '</a>)'; |
| 376 | + $s .= ' (' . $wgLang->timeanddate( $users_first[$name], true ) . ' -- ' . |
| 377 | + $wgLang->timeanddate( $users_last[$name], true ) . ') '; |
373 | 378 | $s .= ' [<strong>' . $count . '</strong>]<br/>'; |
374 | 379 | # Check if this user or IP is blocked |
375 | 380 | # If so, give a link to the block log |
— | — | @@ -489,8 +494,11 @@ |
490 | 495 | $wgOut->addHTML( '<p>'.wfMsgHtml('checkuser-log-fail').'</p>' ); |
491 | 496 | } |
492 | 497 | $dbr = wfGetDB( DB_SLAVE ); |
493 | | - $res = $dbr->select( 'cu_changes', array( 'cuc_ip', 'cuc_timestamp' ), array( 'cuc_user' => $user_id ), $fname, |
494 | | - array( 'ORDER BY' => 'cuc_timestamp DESC' ) ); |
| 498 | + # Limit cap made to stop nasty time outs |
| 499 | + $res = $dbr->select( 'cu_changes', array( 'cuc_ip', 'cuc_timestamp' ), |
| 500 | + array( 'cuc_user' => $user_id ), |
| 501 | + $fname, |
| 502 | + array( 'ORDER BY' => 'cuc_timestamp DESC', 'LIMIT' => 10,000 ) ); |
495 | 503 | if( !$dbr->numRows( $res ) ) { |
496 | 504 | $s = wfMsgHtml("checkuser-nomatch")."\n"; |
497 | 505 | } else { |