]> git.mxchange.org Git - friendica.git/blobdiff - mod/lockview.php
CleanUp Cache namespace
[friendica.git] / mod / lockview.php
index 35c4b043329ae4284250d95a398636407a3d5d8e..fc9fed306699ac270151915a4420794fac3fd3b7 100644 (file)
@@ -6,6 +6,8 @@ use Friendica\App;
 use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Database\DBA;
+use Friendica\DI;
+use Friendica\Model\Group;
 use Friendica\Model\Item;
 
 function lockview_content(App $a)
@@ -58,15 +60,30 @@ function lockview_content(App $a)
                exit();
        }
 
-       $allowed_users  = expand_acl($item['allow_cid']);
-       $allowed_groups = expand_acl($item['allow_gid']);
-       $deny_users     = expand_acl($item['deny_cid']);
-       $deny_groups    = expand_acl($item['deny_gid']);
+       $aclFormatter = DI::aclFormatter();
+
+       $allowed_users = $aclFormatter->expand($item['allow_cid']);
+       $allowed_groups = $aclFormatter->expand($item['allow_gid']);
+       $deny_users = $aclFormatter->expand($item['deny_cid']);
+       $deny_groups = $aclFormatter->expand($item['deny_gid']);
 
        $o = L10n::t('Visible to:') . '<br />';
        $l = [];
 
        if (count($allowed_groups)) {
+               $key = array_search(Group::FOLLOWERS, $allowed_groups);
+               if ($key !== false) {
+                       $l[] = '<b>' . L10n::t('Followers') . '</b>';
+                       unset($allowed_groups[$key]);
+               }
+
+               $key = array_search(Group::MUTUALS, $allowed_groups);
+               if ($key !== false) {
+                       $l[] = '<b>' . L10n::t('Mutuals') . '</b>';
+                       unset($allowed_groups[$key]);
+               }
+
+
                $r = q("SELECT `name` FROM `group` WHERE `id` IN ( %s )",
                        DBA::escape(implode(', ', $allowed_groups))
                );
@@ -89,6 +106,18 @@ function lockview_content(App $a)
        }
 
        if (count($deny_groups)) {
+               $key = array_search(Group::FOLLOWERS, $deny_groups);
+               if ($key !== false) {
+                       $l[] = '<b><strike>' . L10n::t('Followers') . '</strike></b>';
+                       unset($deny_groups[$key]);
+               }
+
+               $key = array_search(Group::MUTUALS, $deny_groups);
+               if ($key !== false) {
+                       $l[] = '<b><strike>' . L10n::t('Mutuals') . '</strike></b>';
+                       unset($deny_groups[$key]);
+               }
+
                $r = q("SELECT `name` FROM `group` WHERE `id` IN ( %s )",
                        DBA::escape(implode(', ', $deny_groups))
                );