Index: trunk/extensions/SocialProfile/UserStats/UserStatsClass.php |
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | |
116 | 116 | function incStatField( $field, $val = 1 ){ |
117 | 117 | global $wgUser, $IP, $wgDBprefix, $wgMemc, $wgSitename, $wgSystemGifts, $wgUserStatsTrackWeekly, $wgUserStatsTrackMonthly, $wgUserStatsPointValues; |
118 | | - if( !$wgUser->isBot() && !$wgUser->isAnon() && $this->stats_fields[$field] ) { |
| 118 | + if( !$wgUser->isAllowed( 'bot' ) && !$wgUser->isAnon() && $this->stats_fields[$field] ) { |
119 | 119 | $dbw = wfGetDB( DB_MASTER ); |
120 | 120 | $dbw->update( 'user_stats', |
121 | 121 | array( $this->stats_fields[$field]."=".$this->stats_fields[$field]."+{$val}" ), |
— | — | @@ -159,7 +159,7 @@ |
160 | 160 | |
161 | 161 | function decStatField( $field, $val = 1 ){ |
162 | 162 | global $wgUser, $wgUserStatsTrackWeekly, $wgUserStatsTrackMonthly; |
163 | | - if( !$wgUser->isBot() && !$wgUser->isAnon() && $this->stats_fields[$field] ) { |
| 163 | + if( !$wgUser->isAllowed( 'bot' ) && !$wgUser->isAnon() && $this->stats_fields[$field] ) { |
164 | 164 | $dbw = wfGetDB( DB_MASTER ); |
165 | 165 | $dbw->update( 'user_stats', |
166 | 166 | array( $this->stats_fields[$field]."=".$this->stats_fields[$field]."-{$val}" ), |
Index: trunk/extensions/SocialProfile/UserStats/SpecialUpdateEditCounts.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | $user = User::newFromId($row->rev_user); |
29 | 29 | $user->loadFromId(); |
30 | 30 | |
31 | | - if( !$user->isBot() ){ |
| 31 | + if( !$user->isAllowed( 'bot' ) ){ |
32 | 32 | $edit_count = $row->the_count; |
33 | 33 | } else { |
34 | 34 | $edit_count = 0; |