aboutsummaryrefslogtreecommitdiffstats
path: root/include/permissions.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/permissions.php')
-rw-r--r--include/permissions.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/permissions.php b/include/permissions.php
index 5527d0afc..bc3cfdd2a 100644
--- a/include/permissions.php
+++ b/include/permissions.php
@@ -239,8 +239,13 @@ function get_all_perms($uid, $observer_xchan, $internal_use = true) {
// Permission granted to certain channels. Let's see if the observer is one of them
if($channel_perm & PERMS_SPECIFIC) {
- if(array_key_exists('my_perms',$abperms) && array_key_exists($perm_name,$abperms['my_perms']) && $abperms['my_perms'][$perm_name]) {
- $ret[$perm_name] = true;
+ if($abperms) {
+ foreach($abperms as $ab) {
+ if(($ab['cat'] == 'my_perms') && ($ab['k'] == $perm_name)) {
+ $ret[$perm_name] = (intval($ab['v']) ? true : false);
+ break;
+ }
+ }
continue;
}
}