aboutsummaryrefslogtreecommitdiffstats
path: root/include/channel.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/channel.php')
-rw-r--r--include/channel.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/include/channel.php b/include/channel.php
index 2c892dbb9..7bfa2b6a2 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -1637,13 +1637,24 @@ function notifications_on($channel_id,$value) {
function get_channel_default_perms($uid) {
+
+ $ret = [];
+
$r = q("select abook_xchan from abook where abook_channel = %d and abook_self = 1 limit 1",
intval($uid)
);
- if($r)
- return load_abconfig($uid,$r[0]['abook_xchan'],'my_perms');
+ if($r) {
+ $x = load_abconfig($uid,$r[0]['abook_xchan'],'my_perms');
+ if($x) {
+ foreach($x as $xv) {
+ if(intval($xv['v'])) {
+ $ret[] = $xv['k'];
+ }
+ }
+ }
+ }
- return array();
+ return $ret;
}