Index: trunk/extensions/CheckUser/CheckUser_body.php |
— | — | @@ -982,7 +982,9 @@ |
983 | 983 | */ |
984 | 984 | protected function CUChangesLine( $row, $reason ) { |
985 | 985 | global $wgLang; |
986 | | - # Add date headers |
| 986 | + static $cuTitle, $flagCache; |
| 987 | + $cuTitle = SpecialPage::getTitleFor( 'CheckUser' ); |
| 988 | + # Add date headers as needed |
987 | 989 | $date = $wgLang->date( wfTimestamp(TS_MW,$row->cuc_timestamp), true, true ); |
988 | 990 | if( !isset($this->lastdate) ) { |
989 | 991 | $this->lastdate = $date; |
— | — | @@ -1001,18 +1003,25 @@ |
1002 | 1004 | # Userlinks |
1003 | 1005 | $line .= $this->sk->userLink( $row->cuc_user, $row->cuc_user_text ); |
1004 | 1006 | $line .= $this->sk->userToolLinks( $row->cuc_user, $row->cuc_user_text ); |
| 1007 | + # Get block info |
| 1008 | + if( isset($flagCache[$row->cuc_user_text]) ) { |
| 1009 | + $flags = $flagCache[$row->cuc_user_text]; |
| 1010 | + } else { |
| 1011 | + $ip = IP::isIPAddress( $row->cuc_user_text ) ? $row->cuc_user_text : ''; |
| 1012 | + $flags = $this->userBlockFlags( $ip, $row->cuc_user, $row->cuc_user_text ); |
| 1013 | + $flagCache[$row->cuc_user_text] = $flags; |
| 1014 | + } |
| 1015 | + # Add any block information |
| 1016 | + if( count($flags) ) $line .= ' ' . implode(' ',$flags); |
1005 | 1017 | # Action text, hackish ... |
1006 | 1018 | if( $row->cuc_actiontext ) |
1007 | 1019 | $line .= ' ' . $this->sk->formatComment( $row->cuc_actiontext ) . ' '; |
1008 | 1020 | # Comment |
1009 | 1021 | $line .= $this->sk->commentBlock( $row->cuc_comment ); |
1010 | | - |
1011 | | - $cuTitle = SpecialPage::getTitleFor( 'CheckUser' ); |
1012 | 1022 | $line .= '<br /> <small>'; |
1013 | 1023 | # IP |
1014 | 1024 | $line .= ' <strong>IP</strong>: '.$this->sk->makeKnownLinkObj( $cuTitle, |
1015 | | - htmlspecialchars( $row->cuc_ip ), |
1016 | | - "user=".urlencode( $row->cuc_ip ).'&reason='.urlencode($reason) ); |
| 1025 | + htmlspecialchars( $row->cuc_ip ), "user=".urlencode( $row->cuc_ip ).'&reason='.urlencode($reason) ); |
1017 | 1026 | # XFF |
1018 | 1027 | if( $row->cuc_xff !=null ) { |
1019 | 1028 | # Flag our trusted proxies |