diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-03-08 09:39:46 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-03-08 09:39:46 +0100 |
commit | bc2b948f1f6e62b1c277a4042200bb6678956f3f (patch) | |
tree | 8586c30e495607eee23f16c0aad40974f0711275 /Zotlabs/Module/Lockview.php | |
parent | 23e3e2c50499fab52769929a448e73012fd915af (diff) | |
parent | ff9442474d07cce24c8f66db39ec34471c3874a2 (diff) | |
download | volse-hubzilla-2.2.tar.gz volse-hubzilla-2.2.tar.bz2 volse-hubzilla-2.2.zip |
Merge branch 2.2RC2.2
Diffstat (limited to 'Zotlabs/Module/Lockview.php')
-rw-r--r-- | Zotlabs/Module/Lockview.php | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/Zotlabs/Module/Lockview.php b/Zotlabs/Module/Lockview.php index 7d1d8a43f..fc7d5c7c8 100644 --- a/Zotlabs/Module/Lockview.php +++ b/Zotlabs/Module/Lockview.php @@ -32,10 +32,10 @@ class Lockview extends \Zotlabs\Web\Controller { if(! $item_id) killme(); - if (!in_array($type, array('item','photo','event', 'menu_item', 'chatroom'))) + if (! in_array($type, array('item', 'photo', 'attach', 'event', 'menu_item', 'chatroom'))) killme(); - //we have different naming in in menu_item table and chatroom table + // we have different naming in in menu_item table and chatroom table switch($type) { case 'menu_item': $id = 'mitem_id'; @@ -101,6 +101,22 @@ class Lockview extends \Zotlabs\Web\Controller { stringify_array_elms($deny_groups,true); stringify_array_elms($deny_users,true); + + $profile_groups = []; + if($allowed_groups) { + foreach($allowed_groups as $g) { + if(substr($g,0,4) === '\'vp.') { + $profile_groups[] = '\'' . substr($g,4); + } + } + } + if(count($profile_groups)) { + $r = q("SELECT profile_name FROM profile WHERE profile_guid IN ( " . implode(', ', $profile_groups) . " )"); + if($r) + foreach($r as $rr) + $l[] = '<li><b>' . t('Profile','acl') . ' ' . $rr['profile_name'] . '</b></li>'; + } + if(count($allowed_groups)) { $r = q("SELECT gname FROM groups WHERE hash IN ( " . implode(', ', $allowed_groups) . " )"); if($r) @@ -120,6 +136,25 @@ class Lockview extends \Zotlabs\Web\Controller { } } } + + + $profile_groups = []; + if($deny_groups) { + foreach($deny_groups as $g) { + if(substr($g,0,4) === '\'vp.') { + $profile_groups[] = '\'' . substr($g,4); + } + } + } + if(count($profile_groups)) { + $r = q("SELECT profile_name FROM profile WHERE profile_guid IN ( " . implode(', ', $profile_groups) . " )"); + if($r) + foreach($r as $rr) + $l[] = '<li><b><strike>' . t('Profile','acl') . ' ' . $rr['profile_name'] . '</strike></b></li>'; + } + + + if(count($deny_groups)) { $r = q("SELECT gname FROM groups WHERE hash IN ( " . implode(', ', $deny_groups) . " )"); if($r) |