r47229 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47228‎ | r47229 | r47230 >
Date:21:03, 13 February 2009
Author:ashley
Status:deferred
Tags:
Comment:
applying r5951 from wikia codebase: don't use deprecated isBot() method
Modified paths:
  • /trunk/extensions/SocialProfile/UserStats/SpecialUpdateEditCounts.php (modified) (history)
  • /trunk/extensions/SocialProfile/UserStats/UserStatsClass.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SocialProfile/UserStats/UserStatsClass.php
@@ -114,7 +114,7 @@
115115
116116 function incStatField( $field, $val = 1 ){
117117 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] ) {
119119 $dbw = wfGetDB( DB_MASTER );
120120 $dbw->update( 'user_stats',
121121 array( $this->stats_fields[$field]."=".$this->stats_fields[$field]."+{$val}" ),
@@ -159,7 +159,7 @@
160160
161161 function decStatField( $field, $val = 1 ){
162162 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] ) {
164164 $dbw = wfGetDB( DB_MASTER );
165165 $dbw->update( 'user_stats',
166166 array( $this->stats_fields[$field]."=".$this->stats_fields[$field]."-{$val}" ),
Index: trunk/extensions/SocialProfile/UserStats/SpecialUpdateEditCounts.php
@@ -27,7 +27,7 @@
2828 $user = User::newFromId($row->rev_user);
2929 $user->loadFromId();
3030
31 - if( !$user->isBot() ){
 31+ if( !$user->isAllowed( 'bot' ) ){
3232 $edit_count = $row->the_count;
3333 } else {
3434 $edit_count = 0;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r5951Make various special pages work, spelling fixesjeluf18:08, 17 October 2004

Status & tagging log