use Friendica\Core\PConfig;
use Friendica\Database\DBM;
use Friendica\Model\Contact;
+use Friendica\Model\Group;
use Friendica\Util\XML;
require_once 'include/datetime.php';
require_once 'include/bbcode.php';
-require_once 'include/group.php';
require_once 'mod/proxy.php';
require_once 'include/enotify.php';
if ($network_count) {
if (intval(Feature::isEnabled(local_user(), 'groups'))) {
// Find out how unseen network posts are spread across groups
- $group_counts = groups_count_unseen();
+ $group_counts = Group::countUnseen();
if (DBM::is_result($group_counts)) {
foreach ($group_counts as $group_count) {
if ($group_count['count'] > 0) {
if (intval(Feature::isEnabled(local_user(), 'forumlist_widget'))) {
$forum_counts = ForumManager::countUnseenItems();
- if (DBM::is_result($forums_counts)) {
- foreach ($forums_counts as $forum_count) {
+ if (DBM::is_result($forum_counts)) {
+ foreach ($forum_counts as $forum_count) {
if ($forum_count['count'] > 0) {
$forums_unseen[] = $forum_count;
}
$notification["href"] = System::baseUrl() . "/notify/view/" . $notification["id"];
- if ($notification["visible"] && !$notification["spam"]
- && !$notification["deleted"] && !is_array($result[$notification["parent"]])
+ if ($notification["visible"]
+ && !$notification["spam"]
+ && !$notification["deleted"]
+ && !(x($result, $notification["parent"]) && is_array($result[$notification["parent"]]))
) {
// Should we condense the notifications or show them all?
if (PConfig::get(local_user(), 'system', 'detailed_notif')) {