]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/PermissionTooltip.php
Update function / rearrange tab order
[friendica.git] / src / Module / PermissionTooltip.php
index 41cc8e0e9556713939e3230e53172562ad3cdc22..4e5191e5a48c3b07e7a9193a62c6931fbb2752e5 100644 (file)
@@ -27,7 +27,7 @@ use Friendica\Core\System;
 use Friendica\Database\DBA;
 use Friendica\DI;
 use Friendica\Model\APContact;
-use Friendica\Model\Group;
+use Friendica\Model\Circle;
 use Friendica\Model\Item;
 use Friendica\Model\Post;
 use Friendica\Model\Tag;
@@ -113,29 +113,29 @@ class PermissionTooltip extends \Friendica\BaseModule
                        exit;
                }
 
-               $allowed_users  = $model['allow_cid'];
-               $allowed_groups = $model['allow_gid'];
-               $deny_users     = $model['deny_cid'];
-               $deny_groups    = $model['deny_gid'];
+               $allowed_users   = $model['allow_cid'];
+               $allowed_circles = $model['allow_gid'];
+               $deny_users      = $model['deny_cid'];
+               $deny_circles    = $model['deny_gid'];
 
                $o = DI::l10n()->t('Visible to:') . '<br />';
                $l = [];
 
-               if (count($allowed_groups)) {
-                       $key = array_search(Group::FOLLOWERS, $allowed_groups);
+               if (count($allowed_circles)) {
+                       $key = array_search(Circle::FOLLOWERS, $allowed_circles);
                        if ($key !== false) {
                                $l[] = '<b>' . DI::l10n()->t('Followers') . '</b>';
-                               unset($allowed_groups[$key]);
+                               unset($allowed_circles[$key]);
                        }
 
-                       $key = array_search(Group::MUTUALS, $allowed_groups);
+                       $key = array_search(Circle::MUTUALS, $allowed_circles);
                        if ($key !== false) {
                                $l[] = '<b>' . DI::l10n()->t('Mutuals') . '</b>';
-                               unset($allowed_groups[$key]);
+                               unset($allowed_circles[$key]);
                        }
 
-                       foreach (DI::dba()->selectToArray('group', ['name'], ['id' => $allowed_groups]) as $group) {
-                               $l[] = '<b>' . $group['name'] . '</b>';
+                       foreach (DI::dba()->selectToArray('group', ['name'], ['id' => $allowed_circles]) as $circle) {
+                               $l[] = '<b>' . $circle['name'] . '</b>';
                        }
                }
 
@@ -143,21 +143,21 @@ class PermissionTooltip extends \Friendica\BaseModule
                        $l[] = $contact['name'];
                }
 
-               if (count($deny_groups)) {
-                       $key = array_search(Group::FOLLOWERS, $deny_groups);
+               if (count($deny_circles)) {
+                       $key = array_search(Circle::FOLLOWERS, $deny_circles);
                        if ($key !== false) {
                                $l[] = '<b><strike>' . DI::l10n()->t('Followers') . '</strike></b>';
-                               unset($deny_groups[$key]);
+                               unset($deny_circles[$key]);
                        }
 
-                       $key = array_search(Group::MUTUALS, $deny_groups);
+                       $key = array_search(Circle::MUTUALS, $deny_circles);
                        if ($key !== false) {
                                $l[] = '<b><strike>' . DI::l10n()->t('Mutuals') . '</strike></b>';
-                               unset($deny_groups[$key]);
+                               unset($deny_circles[$key]);
                        }
 
-                       foreach (DI::dba()->selectToArray('group', ['name'], ['id' => $allowed_groups]) as $group) {
-                               $l[] = '<b><strike>' . $group['name'] . '</strike></b>';
+                       foreach (DI::dba()->selectToArray('group', ['name'], ['id' => $allowed_circles]) as $circle) {
+                               $l[] = '<b><strike>' . $circle['name'] . '</strike></b>';
                        }
                }
 
@@ -242,7 +242,7 @@ class PermissionTooltip extends \Friendica\BaseModule
                                case Tag::ATTRIBUTED:
                                        $output .= DI::l10n()->t('<b>Attributed To:</b> %s<br>', implode(', ', $receiver));
                                        break;
-                               }
+                       }
                }
 
                return $output;