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:15:45 -0700
commit005186bf4a461578d068aaab6164c84dd7ea9409 (patch)
tree714b338463f1b0d016d01761ac55ef8a6b5413bf
parent95d24f1d3005e31dbf9f36cfc97f456c45229f1b (diff)
downloadvolse-hubzilla-005186bf4a461578d068aaab6164c84dd7ea9409.tar.gz
volse-hubzilla-005186bf4a461578d068aaab6164c84dd7ea9409.tar.bz2
volse-hubzilla-005186bf4a461578d068aaab6164c84dd7ea9409.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 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;
}