From df7a9e2e47a3749d1b7aab64a56d80ecb03e62b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Xavier=20Deltombe?= Date: Thu, 24 May 2012 15:18:50 +0000 Subject: [PATCH] Change order of conditions in notification requests (Lemonldap-468) --- .../lib/Lemonldap/NG/Portal/Notification/DBI.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Notification/DBI.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Notification/DBI.pm index 24e1b3ad9..507046209 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Notification/DBI.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Notification/DBI.pm @@ -104,7 +104,7 @@ sub delete { return _execute( $self, "UPDATE $self->{dbiTable} " . "SET done='$ts[5]-$ts[4]-$ts[3] $ts[2]:$ts[1]' " - . "WHERE done IS NULL AND date='$d' AND uid='$u' AND ref='$r'" ); + . "WHERE done IS NULL AND uid='$u' AND ref='$r' AND date='$d'" ); } ## @method boolean purge(string myref) @@ -123,7 +123,7 @@ sub purge { $d =~ s/'/''/g; return _execute( $self, "DELETE FROM $self->{dbiTable} " - . "WHERE done IS NOT NULL AND date='$d' AND uid='$u' AND ref='$r'" ); + . "WHERE done IS NOT NULL AND uid='$u' AND ref='$r' AND date='$d'" ); } ## @method boolean newNotif(string date, string uid, string ref, string condition, string xml)