Index: trunk/phase3/includes/AuthPlugin.php |
— | — | @@ -244,6 +244,11 @@ |
245 | 245 | # Override this! |
246 | 246 | } |
247 | 247 | |
| 248 | + public function getId() { |
| 249 | + # Override this! |
| 250 | + return -1; |
| 251 | + } |
| 252 | + |
248 | 253 | public function isLocked() { |
249 | 254 | # Override this! |
250 | 255 | return false; |
Index: trunk/extensions/CheckUser/CheckUser_body.php |
— | — | @@ -777,6 +777,7 @@ |
778 | 778 | if( !$dbr->numRows( $ret ) ) { |
779 | 779 | $s = $this->noMatchesMessage($ip)."\n"; |
780 | 780 | } else { |
| 781 | + global $wgAuth; |
781 | 782 | while( ($row = $dbr->fetchObject($ret) ) != false ) { |
782 | 783 | if( !array_key_exists( $row->cuc_user_text, $users_edits ) ) { |
783 | 784 | $users_last[$row->cuc_user_text] = $row->cuc_timestamp; |
— | — | @@ -805,30 +806,39 @@ |
806 | 807 | |
807 | 808 | $logs = SpecialPage::getTitleFor( 'Log' ); |
808 | 809 | $blocklist = SpecialPage::getTitleFor( 'Ipblocklist' ); |
809 | | - |
| 810 | + |
810 | 811 | $action = $wgTitle->escapeLocalUrl( 'action=block' ); |
811 | 812 | $s = "<form name='checkuserblock' id='checkuserblock' action=\"$action\" method='post'>"; |
812 | 813 | $s .= '<div id="checkuserresults"><ul>'; |
813 | 814 | foreach( $users_edits as $name => $count ) { |
814 | 815 | $s .= '<li>'; |
815 | 816 | $s .= Xml::check( 'users[]', false, array( 'value' => $name ) ) . ' '; |
| 817 | + # Load user object |
| 818 | + $user = User::newFromName( $name, false ); |
| 819 | + $authUser = $wgAuth->getUserInstance( $user ); |
| 820 | + # Show if account is local only |
| 821 | + if( $authUser->getId() === 0 ) { |
| 822 | + $s .= '*'; |
| 823 | + } |
| 824 | + # Add user tool links |
816 | 825 | $s .= $this->sk->userLink( -1 , $name ) . $this->sk->userToolLinks( -1 , $name ); |
| 826 | + # Add CheckUser link |
817 | 827 | $s .= ' (<a href="' . $wgTitle->escapeLocalURL( 'user='.urlencode($name) . |
818 | 828 | '&reason='.urlencode($reason) ) . '">' . wfMsgHtml('checkuser-check') . '</a>)'; |
| 829 | + # Show edit time range |
819 | 830 | if( $users_first[$name] == $users_last[$name] ) { |
820 | 831 | $s .= ' (' . $wgLang->timeanddate( wfTimestamp(TS_MW,$users_first[$name]), true ) . ') '; |
821 | 832 | } else { |
822 | 833 | $s .= ' (' . $wgLang->timeanddate( wfTimestamp(TS_MW,$users_first[$name]), true ) . |
823 | 834 | ' -- ' . $wgLang->timeanddate( wfTimestamp(TS_MW,$users_last[$name]), true ) . ') '; |
824 | 835 | } |
| 836 | + # Total edit count |
825 | 837 | $s .= ' [<strong>' . $count . '</strong>]<br />'; |
826 | | - $flags = array(); |
827 | 838 | # Check if this user or IP is blocked. If so, give a link to the block log... |
828 | 839 | $block = new Block(); |
829 | 840 | $block->fromMaster( false ); // use slaves |
830 | 841 | $ip = IP::isIPAddress( $name ) ? $name : ''; |
831 | | - # Load user object |
832 | | - $user = User::newFromName( $name, false ); |
| 842 | + $flags = array(); |
833 | 843 | if( $block->load( $ip, $users_ids[$name] ) ) { |
834 | 844 | // Range blocked? |
835 | 845 | if( IP::isIPAddress($block->mAddress) && strpos($block->mAddress,'/') ) { |