aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Settings
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-02-09 19:52:13 -0800
committerzotlabs <mike@macgirvin.com>2017-02-09 19:52:13 -0800
commit1fb37f93ccf4739a6f92f3f36c1ee4ec8ef66a07 (patch)
tree2fdf66b9da436e25510384a1670ae2e341f961fc /Zotlabs/Module/Settings
parentfce33402e74f7ff6066ef859e7801a9201db28e1 (diff)
downloadvolse-hubzilla-1fb37f93ccf4739a6f92f3f36c1ee4ec8ef66a07.tar.gz
volse-hubzilla-1fb37f93ccf4739a6f92f3f36c1ee4ec8ef66a07.tar.bz2
volse-hubzilla-1fb37f93ccf4739a6f92f3f36c1ee4ec8ef66a07.zip
more permissions optimisations
Diffstat (limited to 'Zotlabs/Module/Settings')
-rw-r--r--Zotlabs/Module/Settings/Channel.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/Zotlabs/Module/Settings/Channel.php b/Zotlabs/Module/Settings/Channel.php
index a89d83544..9ea459dab 100644
--- a/Zotlabs/Module/Settings/Channel.php
+++ b/Zotlabs/Module/Settings/Channel.php
@@ -88,15 +88,17 @@ class Channel {
intval(local_channel())
);
}
-
- $x = \Zotlabs\Access\Permissions::FilledPerms($role_permissions['perms_connect']);
- foreach($x as $k => $v) {
- set_abconfig(local_channel(),$channel['channel_hash'],'my_perms',$k, $v);
- if($role_permissions['perms_auto']) {
- set_pconfig(local_channel(),'autoperms',$k,$v);
- }
- else {
- del_pconfig(local_channel(),'autoperms',$k);
+
+ if($role_permissions['perms_connect']) {
+ $x = \Zotlabs\Access\Permissions::FilledPerms($role_permissions['perms_connect']);
+ foreach($x as $k => $v) {
+ set_abconfig(local_channel(),$channel['channel_hash'],'my_perms',$k, $v);
+ if($role_permissions['perms_auto']) {
+ set_pconfig(local_channel(),'autoperms',$k,$v);
+ }
+ else {
+ del_pconfig(local_channel(),'autoperms',$k);
+ }
}
}