From: Aaron Schulz Date: Thu, 26 May 2016 18:36:40 +0000 (-0700) Subject: Exclude bots from edit stash stats X-Git-Tag: 1.31.0-rc.0~6813 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=cddfe0d98fed01b65750928fe535ad6db2e39bf1;p=lhc%2Fweb%2Fwiklou.git Exclude bots from edit stash stats Change-Id: Id309879eaaf039de7ac5f531930fa8e758a959c7 --- diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index 93003ccfc0..ce254c96fb 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -259,6 +259,10 @@ class ApiStashEdit extends ApiBase { * @return stdClass|bool Returns false on cache miss */ public static function checkCache( Title $title, Content $content, User $user ) { + if ( $user->isBot() ) { + return false; // bots never stash - don't pollute stats + } + $cache = ObjectCache::getLocalClusterInstance(); $logger = LoggerFactory::getInstance( 'StashEdit' ); $stats = RequestContext::getMain()->getStats();