From 0532dc6a6103cc694050350c2a7a7f92f354ab46 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Sun, 7 Aug 2016 12:26:49 +0200 Subject: [PATCH] notifications - correct boolean variable checking --- include/NotificationsManager.php | 4 ++-- mod/notifications.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/NotificationsManager.php b/include/NotificationsManager.php index 6962d02cc0..3b7cbdfc99 100644 --- a/include/NotificationsManager.php +++ b/include/NotificationsManager.php @@ -662,7 +662,7 @@ class NotificationsManager { private function introTotal($all = false) { $sql_extra = ""; - if($all === false) + if(!$all) $sql_extra = " AND `ignore` = 0 "; $r = q("SELECT COUNT(*) AS `total` FROM `intro` @@ -696,7 +696,7 @@ class NotificationsManager { $notifs = array(); $sql_extra = ""; - if($all === false) + if(!$all) $sql_extra = " AND `ignore` = 0 "; /// @todo Fetch contact details by "get_contact_details_by_url" instead of queries to contact, fcontact and gcontact diff --git a/mod/notifications.php b/mod/notifications.php index 01dce2f447..d43e2cc04f 100644 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -148,8 +148,8 @@ function notifications_content(&$a) { // The link to switch between ignored and normal connection requests $notif_show_lnk = array( - 'href' => ($all === false ? 'notifications/intros/all' : 'notifications/intros' ), - 'text' => ($all === false ? t('Show Ignored Requests') : t('Hide Ignored Requests')) + 'href' => (!$all ? 'notifications/intros/all' : 'notifications/intros' ), + 'text' => (!$all ? t('Show Ignored Requests') : t('Hide Ignored Requests')) ); // Loop through all introduction notifications.This creates an array with the output html for each -- 2.39.5