diff options
author | Mario <mario@mariovavti.com> | 2020-10-23 06:52:18 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-10-23 06:52:18 +0000 |
commit | 69d627a58bee8eb9922fd68211982d12c1f7cb75 (patch) | |
tree | ebe8c0fe95d4287b8ea7487481344dd295e6ec92 /Zotlabs/Lib/Libzot.php | |
parent | c1f36802a14c027b580a79ef5e6b85f08a4a918f (diff) | |
parent | 2772c335635aa5248a4509e0976432707b3e716e (diff) | |
download | volse-hubzilla-69d627a58bee8eb9922fd68211982d12c1f7cb75.tar.gz volse-hubzilla-69d627a58bee8eb9922fd68211982d12c1f7cb75.tar.bz2 volse-hubzilla-69d627a58bee8eb9922fd68211982d12c1f7cb75.zip |
Merge branch 'dev' into 5.0RC
Diffstat (limited to 'Zotlabs/Lib/Libzot.php')
-rw-r--r-- | Zotlabs/Lib/Libzot.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php index 44f1f399e..f0fe3ab24 100644 --- a/Zotlabs/Lib/Libzot.php +++ b/Zotlabs/Lib/Libzot.php @@ -326,14 +326,10 @@ class Libzot { if($permissions && is_array($permissions)) { $old_read_stream_perm = get_abconfig($channel['channel_id'],$x['hash'],'their_perms','view_stream'); - // We need to reset their_perms prior to setting the new ones. - // Otherwise withdrawn permissions will not take effect locally. - q("DELETE FROM abconfig WHERE chan = %d AND xchan = '%s' AND cat = 'their_perms'", - intval($channel['channel_id']), - dbesc($x['hash']) - ); - foreach($permissions as $p) { - set_abconfig($channel['channel_id'],$x['hash'],'their_perms',$p,'1'); + $permissions = Permissions::FilledPerms($permissions); + + foreach($permissions as $k => $v) { + set_abconfig($channel['channel_id'],$x['hash'],'their_perms',$k,$v); } } |