From d7356a350ff6e57d7b7bf4224993a07a8d1bd8b6 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 10 Mar 2011 17:56:13 +0000 Subject: [PATCH] * Calendar: fixed SQL error on search: Argument of OR must be of type boolean, not of type smallint --- calendar/inc/class.calendar_so.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/calendar/inc/class.calendar_so.inc.php b/calendar/inc/class.calendar_so.inc.php index a93f027b93..e95d1461ed 100644 --- a/calendar/inc/class.calendar_so.inc.php +++ b/calendar/inc/class.calendar_so.inc.php @@ -345,8 +345,8 @@ class calendar_so // Searching - restrict private to own or private grant $private_grants = $GLOBALS['egw']->acl->get_ids_for_location($GLOBALS['egw_info']['user']['account_id'], EGW_ACL_PRIVATE, 'calendar'); - $private_filter = '(cal_public OR cal_owner = ' . $GLOBALS['egw_info']['user']['account_id']; - if($private_grants) $private_filter .= ' OR !cal_public AND cal_owner IN (' . implode(',',$private_grants) . ')'; + $private_filter = '(cal_public=1 OR cal_owner = ' . $GLOBALS['egw_info']['user']['account_id']; + if($private_grants) $private_filter .= ' OR cal_public=0 AND cal_owner IN (' . implode(',',$private_grants) . ')'; $private_filter .= ')'; $where[] = $private_filter; }