From afafbec708ddd7adc22bceff54b731c91df42c3d Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Fri, 23 Apr 2010 19:11:24 +0000 Subject: [PATCH] Use db->quote to get good cross db comparisons --- calendar/inc/class.calendar_so.inc.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/calendar/inc/class.calendar_so.inc.php b/calendar/inc/class.calendar_so.inc.php index 66f6c0a86e..773aa7f839 100644 --- a/calendar/inc/class.calendar_so.inc.php +++ b/calendar/inc/class.calendar_so.inc.php @@ -398,13 +398,14 @@ class calendar_so // this is only used, when we cannot use UNIONS if (!$useUnionQuery) $where[] = '('.implode(' OR ',$to_or).')'; - if($filter != 'deleted') { - $where[] = "!cal_deleted"; + if($filter != 'deleted') + { + $where[] = 'cal_deleted='.$this->db->quote(false,'bool'); } switch($filter) { case 'deleted': - $where[] = "cal_deleted"; break; + $where[] = 'cal_deleted='.$this->db->quote(true,'bool'); case 'unknown': $where[] = "cal_status='U'"; break; case 'accepted':