aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/settings.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/mod/settings.php b/mod/settings.php
index 77e01d9b7..58257368e 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -324,15 +324,20 @@ function settings_post(&$a) {
return;
}
}
-
- if($role_permissions['perms_auto']) {
- $r = q("update abook set abook_my_perms = %d where abook_channel = %d and (abook_flags & %d) limit 1",
- intval($role_permissions['perms_accept']),
- intval(local_user()),
- intval(ABOOK_FLAG_SELF)
+ // no default collection
+ else {
+ q("update channel set channel_default_group = '', channel_allow_gid = '', channel_allow_cid = '', channel_deny_gid = '',
+ channel_deny_cid = '' where channel_id = %d limit 1",
+ intval(local_user())
);
}
+ $r = q("update abook set abook_my_perms = %d where abook_channel = %d and (abook_flags & %d) limit 1",
+ intval(($role_permissions['perms_auto']) ? intval($role_permissions['perms_accept']) : 0),
+ intval(local_user()),
+ intval(ABOOK_FLAG_SELF)
+ );
+
foreach($role_permissions as $p => $v) {
if(strpos($p,'channel_') !== false) {
$set_perms .= ', ' . $p . ' = ' . intval($v) . ' ';