dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70739c2
)
Exclude bots from edit stash stats
author
Aaron Schulz
<aschulz@wikimedia.org>
Thu, 26 May 2016 18:36:40 +0000
(11:36 -0700)
committer
Aaron Schulz
<aschulz@wikimedia.org>
Thu, 26 May 2016 18:36:40 +0000
(11:36 -0700)
Change-Id: Id309879eaaf039de7ac5f531930fa8e758a959c7
includes/api/ApiStashEdit.php
patch
|
blob
|
history
diff --git
a/includes/api/ApiStashEdit.php
b/includes/api/ApiStashEdit.php
index
93003cc
..
ce254c9
100644
(file)
--- 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();