aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <mike@macgirvin.com>2016-09-06 16:15:45 -0700
committerredmatrix <mike@macgirvin.com>2016-09-06 16:18:06 -0700
commit57033bb5992253f7de828683b11d628f1c356a51 (patch)
tree4c7c0eea4b44c4de4e38e963e406d4ecf17bab8a
parent760427fc439b0603690e30a99bc3ee504cdcb5bd (diff)
downloadvolse-hubzilla-57033bb5992253f7de828683b11d628f1c356a51.tar.gz
volse-hubzilla-57033bb5992253f7de828683b11d628f1c356a51.tar.bz2
volse-hubzilla-57033bb5992253f7de828683b11d628f1c356a51.zip
custom/expert permissions bug
-rw-r--r--include/channel.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/include/channel.php b/include/channel.php
index 62c35e3ff..bfd300a0d 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -1627,13 +1627,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;
}