* Calendar: fixed SQL error on search: Argument of OR must be of type boolean, not of type smallint

This commit is contained in:
Ralf Becker 2011-03-10 17:56:13 +00:00
parent dffb0b87dd
commit d7356a350f

View File

@ -345,8 +345,8 @@ class calendar_so
// Searching - restrict private to own or private grant // 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_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']; $private_filter = '(cal_public=1 OR cal_owner = ' . $GLOBALS['egw_info']['user']['account_id'];
if($private_grants) $private_filter .= ' OR !cal_public AND cal_owner IN (' . implode(',',$private_grants) . ')'; if($private_grants) $private_filter .= ' OR cal_public=0 AND cal_owner IN (' . implode(',',$private_grants) . ')';
$private_filter .= ')'; $private_filter .= ')';
$where[] = $private_filter; $where[] = $private_filter;
} }