From eed969f5713bbbfc0b12e3b43cce03b55497d7b8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Mon, 25 Feb 2013 00:24:08 +0100 Subject: [PATCH] Don't notify birthday of dead people. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- include/notifs.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/notifs.inc.php b/include/notifs.inc.php index e08a723..3899308 100644 --- a/include/notifs.inc.php +++ b/include/notifs.inc.php @@ -198,6 +198,7 @@ class WatchBirthday extends WatchOperation protected function buildCondition(Watch $watch) { + $not_dead = new PFC_Not(new UFC_Dead()); $select_date = new PFC_OR(new UFC_Birthday('=', time()), new PFC_And(new UFC_Birthday('<=', time() + self::WATCH_LIMIT), new UFC_Birthday('>', $watch->date() + self::WATCH_LIMIT))); @@ -210,7 +211,7 @@ class WatchBirthday extends WatchOperation new UFC_Promo('<=', $profile->mainGrade(), $profile->yearpromo() + 1)), $watch->groupCondition()); } - return new PFC_And($select_date, $cond); + return new PFC_And($not_dead, $select_date, $cond); } public function getOrder() -- 2.1.4