}
if ($network_count) {
- if (intval(Feature::isEnabled(local_user(), 'groups'))) {
- // Find out how unseen network posts are spread across groups
- $group_counts = Group::countUnseen();
- if (DBA::isResult($group_counts)) {
- foreach ($group_counts as $group_count) {
- if ($group_count['count'] > 0) {
- $groups_unseen[] = $group_count;
- }
+ // Find out how unseen network posts are spread across groups
+ $group_counts = Group::countUnseen();
+ if (DBA::isResult($group_counts)) {
+ foreach ($group_counts as $group_count) {
+ if ($group_count['count'] > 0) {
+ $groups_unseen[] = $group_count;
}
}
}
- if (intval(Feature::isEnabled(local_user(), 'forumlist_widget'))) {
- $forum_counts = ForumManager::countUnseenItems();
- if (DBA::isResult($forum_counts)) {
- foreach ($forum_counts as $forum_count) {
- if ($forum_count['count'] > 0) {
- $forums_unseen[] = $forum_count;
- }
+ $forum_counts = ForumManager::countUnseenItems();
+ if (DBA::isResult($forum_counts)) {
+ foreach ($forum_counts as $forum_count) {
+ if ($forum_count['count'] > 0) {
+ $forums_unseen[] = $forum_count;
}
}
}
$intro_count = count($intros1) + count($intros2);
$intros = $intros1 + $intros2;
- $myurl = System::baseUrl() . '/profile/' . $a->user['nickname'] ;
+ $myurl = System::baseUrl() . '/profile/' . $a->user['nickname'];
$mails = q(
"SELECT `id`, `from-name`, `from-url`, `from-photo`, `created` FROM `mail`
WHERE `uid` = %d AND `seen` = 0 AND `from-url` != '%s' ",
$mail_count = count($mails);
if (intval(Config::get('config', 'register_policy')) === REGISTER_APPROVE && is_site_admin()) {
- $regs = q(
- "SELECT `contact`.`name`, `contact`.`url`, `contact`.`micro`, `register`.`created`
- FROM `contact` RIGHT JOIN `register` ON `register`.`uid` = `contact`.`uid`
- WHERE `contact`.`self` = 1"
- );
+ $regs = Friendica\Model\Register::getPending();
if (DBA::isResult($regs)) {
$register_count = count($regs);
DBA::escape(DateTimeFormat::utcNow())
);
if (DBA::isResult($ev)) {
- Cache::set($cachekey, $ev, CACHE_HOUR);
+ Cache::set($cachekey, $ev, Cache::HOUR);
}
}
$sysmsgs = [];
$sysmsgs_info = [];
- if (x($_SESSION, 'sysmsg')) {
+ if (!empty($_SESSION['sysmsg'])) {
$sysmsgs = $_SESSION['sysmsg'];
unset($_SESSION['sysmsg']);
}
- if (x($_SESSION, 'sysmsg_info')) {
+ if (!empty($_SESSION['sysmsg_info'])) {
$sysmsgs_info = $_SESSION['sysmsg_info'];
unset($_SESSION['sysmsg_info']);
}
if ($notification["visible"]
&& !$notification["deleted"]
- && !(x($result, $notification["parent"]) && !empty($result[$notification["parent"]]))
+ && empty($result[$notification["parent"]])
) {
// Should we condense the notifications or show them all?
if (PConfig::get(local_user(), 'system', 'detailed_notif')) {