Change order of conditions in notification requests (Lemonldap-468)

This commit is contained in:
François-Xavier Deltombe 2012-05-24 15:18:50 +00:00
parent cb06f50860
commit df7a9e2e47

View File

@ -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)