X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FGroup.php;h=889f8269d1a2646820c2d5c32d03f2ce904a2330;hb=87673fd0c52b40d1100fd46c648c786bab3750cf;hp=b4dbb87d82f315cc1b77ead3f53eab96fba40248;hpb=e80d68ba53776bed047d897f52db7e25b35a479d;p=friendica.git diff --git a/src/Model/Group.php b/src/Model/Group.php index b4dbb87d82..889f8269d1 100644 --- a/src/Model/Group.php +++ b/src/Model/Group.php @@ -1,6 +1,6 @@ $gid]); if (DBA::isResult($group) && $group['deleted']) { DBA::update('group', ['deleted' => 0], ['id' => $gid]); - notice(DI::l10n()->t('A deleted group with this name was revived. Existing item permissions may apply to this group and any future members. If this is not what you intended, please create another group with a different name.') . EOL); + notice(DI::l10n()->t('A deleted group with this name was revived. Existing item permissions may apply to this group and any future members. If this is not what you intended, please create another group with a different name.')); } return true; } @@ -160,7 +160,7 @@ class Group public static function countUnseen() { $stmt = DBA::p("SELECT `group`.`id`, `group`.`name`, - (SELECT COUNT(*) FROM `item` FORCE INDEX (`uid_unseen_contactid`) + (SELECT COUNT(*) FROM `post-user` WHERE `uid` = ? AND `unseen` AND `contact-id` IN @@ -505,10 +505,17 @@ class Group $groupedit = null; } + if ($each == 'group') { + $count = DBA::count('group_member', ['gid' => $group['id']]); + $group_name = sprintf('%s (%d)', $group['name'], $count); + } else { + $group_name = $group['name']; + } + $display_groups[] = [ 'id' => $group['id'], 'cid' => $cid, - 'text' => $group['name'], + 'text' => $group_name, 'href' => $each . '/' . $group['id'], 'edit' => $groupedit, 'selected' => $selected,