X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fmanage.php;h=a6ab32c2d8428c713398dc61b6f816d504826b57;hb=83e4141639d026dfa93c4c2c0f9fe00a7cf56446;hp=4beb8e46c65384d545951fb39d7b72df37769dc6;hpb=7b352f3f74b045690cdeae507b609f7a9cc8db03;p=friendica.git diff --git a/mod/manage.php b/mod/manage.php index 4beb8e46c6..a6ab32c2d8 100644 --- a/mod/manage.php +++ b/mod/manage.php @@ -1,7 +1,8 @@ user['nickname']) ? true : false); + $identities[$key]['selected'] = ($id['nickname'] === $a->user['nickname']); $notifications = 0; $r = q("SELECT DISTINCT(`parent`) FROM `notify` WHERE `uid` = %d AND NOT `seen` AND NOT (`type` IN (%d, %d))", intval($id['uid']), intval(NOTIFY_INTRO), intval(NOTIFY_MAIL)); - if ($r) + + if (dbm::is_result($r)) { $notifications = sizeof($r); + } $r = q("SELECT DISTINCT(`convid`) FROM `mail` WHERE `uid` = %d AND NOT `seen`", intval($id['uid'])); - if ($r) + + if (dbm::is_result($r)) { $notifications = $notifications + sizeof($r); + } $r = q("SELECT COUNT(*) AS `introductions` FROM `intro` WHERE NOT `blocked` AND NOT `ignore` AND `uid` = %d", intval($id['uid'])); - if ($r) + + if (dbm::is_result($r)) { $notifications = $notifications + $r[0]["introductions"]; + } $identities[$key]['notifications'] = $notifications; }