aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-08-12 18:17:39 -0700
committerredmatrix <git@macgirvin.com>2016-08-12 18:18:35 -0700
commit2c8a82713e828ae79374099c8de90dd584f9f4d1 (patch)
tree7b74cd580df5f4d9dae092908f4bb26d2461516c /include
parent7d2a17ea6e9d78eec620e8d75a0cb4c96f5d98f2 (diff)
downloadvolse-hubzilla-2c8a82713e828ae79374099c8de90dd584f9f4d1.tar.gz
volse-hubzilla-2c8a82713e828ae79374099c8de90dd584f9f4d1.tar.bz2
volse-hubzilla-2c8a82713e828ae79374099c8de90dd584f9f4d1.zip
pending flag not being reset when using autoperms from custom role
Diffstat (limited to 'include')
-rw-r--r--include/zot.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/zot.php b/include/zot.php
index 3a1986e3b..01b29f74b 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -457,11 +457,13 @@ function zot_refresh($them, $channel = null, $force = false) {
// new connection
$my_perms = null;
+ $automatic = false;
$role = get_pconfig($channel['channel_id'],'system','permissions_role');
if($role) {
$xx = \Zotlabs\Access\PermissionRoles::role_perms($role);
if($xx['perms_auto']) {
+ $automatic = true;
$default_perms = $xx['perms_connect'];
$my_perms = \Zotlabs\Access\Permissions::FilledPerms($default_perms);
}
@@ -470,6 +472,7 @@ function zot_refresh($them, $channel = null, $force = false) {
if(! $my_perms) {
$m = \Zotlabs\Access\Permissions::FilledAutoperms($channel['channel_id']);
if($m) {
+ $automatic = true;
$my_perms = $m;
}
}
@@ -496,7 +499,7 @@ function zot_refresh($them, $channel = null, $force = false) {
dbesc(datetime_convert()),
dbesc(datetime_convert()),
dbesc($next_birthday),
- intval(($default_perms) ? 0 : 1)
+ intval(($automatic) ? 0 : 1)
);
if($y) {