]> git.mxchange.org Git - friendica.git/blobdiff - mod/lockview.php
Issue 7285: Perform duplicate check for item URI also with AP
[friendica.git] / mod / lockview.php
index 35c4b043329ae4284250d95a398636407a3d5d8e..eede1b6a0dac4eca34d039a470b3d22f7e5dcdfa 100644 (file)
@@ -6,6 +6,7 @@ use Friendica\App;
 use Friendica\Core\Hook;
 use Friendica\Core\L10n;
 use Friendica\Database\DBA;
+use Friendica\Model\Group;
 use Friendica\Model\Item;
 
 function lockview_content(App $a)
@@ -67,6 +68,19 @@ function lockview_content(App $a)
        $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 +103,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))
                );