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:
9d04df5
)
Make User::isBot() also check the "bot" right for sanity
author
Aaron Schulz
<aschulz@wikimedia.org>
Thu, 12 May 2016 20:02:41 +0000
(13:02 -0700)
committer
Aaron Schulz
<aschulz@wikimedia.org>
Thu, 12 May 2016 23:03:44 +0000
(16:03 -0700)
Change-Id: I835cc23719c1975bb86f642d3ede36c882ce2e9b
includes/user/User.php
patch
|
blob
|
history
diff --git
a/includes/user/User.php
b/includes/user/User.php
index
3d7d71c
..
b62d252
100644
(file)
--- a/
includes/user/User.php
+++ b/
includes/user/User.php
@@
-3403,12
+3403,14
@@
class User implements IDBAccessObject {
* @since 1.28
*/
public function isBot() {
- $isBot = false;
- if ( !Hooks::run( "UserIsBot", [ $this, &$isBot ] ) ) {
- return $isBot;
+ if ( in_array( 'bot', $this->getGroups() ) && $this->isAllowed( 'bot' ) ) {
+ return true;
}
- return ( $isBot || in_array( 'bot', $this->getGroups() ) );
+ $isBot = false;
+ Hooks::run( "UserIsBot", [ $this, &$isBot ] );
+
+ return $isBot;
}
/**