r34436 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34435‎ | r34436 | r34437 >
Date:15:01, 8 May 2008
Author:leon
Status:old
Tags:
Comment:
(bug 14044) Don't increment page view counters on views from bot users
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -2594,11 +2594,12 @@
25952595 * @private
25962596 */
25972597 function viewUpdates() {
2598 - global $wgDeferredUpdateList;
 2598+ global $wgDeferredUpdateList, $wgUser;
25992599
26002600 if ( 0 != $this->getID() ) {
 2601+ # Don't update page view counters on views from bot users (bug 14044)
26012602 global $wgDisableCounters;
2602 - if( !$wgDisableCounters ) {
 2603+ if( !$wgDisableCounters && !$wgUser->isAllowed( 'bot' ) ) {
26032604 Article::incViewCount( $this->getID() );
26042605 $u = new SiteStatsUpdate( 1, 0, 0 );
26052606 array_push( $wgDeferredUpdateList, $u );
@@ -2606,7 +2607,6 @@
26072608 }
26082609
26092610 # Update newtalk / watchlist notification status
2610 - global $wgUser;
26112611 $wgUser->clearNotification( $this->mTitle );
26122612 }
26132613
Index: trunk/phase3/RELEASE-NOTES
@@ -260,8 +260,8 @@
261261 * (bug 13982) Disable ccmeonemails preference when user-to-user mails disabled
262262 * (bug 13615) Update case mappings and normalization to Unicode 5.1.0
263263 Note that case mappings will only be used if mbstring extension is not present.
 264+* (bug 14044) Don't increment page view counters on views from bot users
264265
265 -
266266 === API changes in 1.13 ===
267267
268268 * Fixing main page display in meta=siteinfo

Status & tagging log