diff options
author | Sarven Capadisli <csarven@status.net> | 2009-11-08 23:10:34 +0000 |
---|---|---|
committer | Sarven Capadisli <csarven@status.net> | 2009-11-08 23:10:34 +0000 |
commit | 8e58f241739b97bd53f78035781f16e2067a31d9 (patch) | |
tree | 8ad366f5f408d1181b1816f607a120fe0c91c502 /classes/User.php | |
parent | 2a0a363e1d846334bc37d46b5f6f42e64a5a96eb (diff) | |
parent | b78a35ec73980d8dfa2fcb68ef81936f4b3c110b (diff) |
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'classes/User.php')
-rw-r--r-- | classes/User.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/classes/User.php b/classes/User.php index b0d372be8..c529b82e0 100644 --- a/classes/User.php +++ b/classes/User.php @@ -87,7 +87,7 @@ class User extends Memcached_DataObject return (is_null($sub)) ? false : true; } - // 'update' won't write key columns, so we have to do it ourselves. + // 'update' will not write key columns, so we have to do it ourselves. function updateKeys(&$orig) { @@ -384,7 +384,7 @@ class User extends Memcached_DataObject return false; } - // Otherwise, cache doesn't have all faves; + // Otherwise, cache does not have all faves; // fall through to the default } @@ -463,7 +463,7 @@ class User extends Memcached_DataObject { $cache = common_memcache(); if ($cache) { - // Faves don't happen chronologically, so we need to blow + // Faves do not happen chronologically, so we need to blow // ;last cache, too $cache->delete(common_cache_key('fave:ids_by_user:'.$this->id)); $cache->delete(common_cache_key('fave:ids_by_user:'.$this->id.';last')); @@ -705,10 +705,12 @@ class User extends Memcached_DataObject if (Event::handle('UserRightsCheck', array($this, $right, &$result))) { switch ($right) { - case Right::deleteOthersNotice: - $result = $this->hasRole('moderator'); + case Right::DELETEOTHERSNOTICE: + $result = $this->hasRole(User_role::MODERATOR); break; - default: + case Right::CONFIGURESITE: + $result = $this->hasRole(User_role::ADMINISTRATOR); + default: $result = false; break; } |