From 5529618ba17bf78eec0516114719170247fcbca1 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Tue, 19 Jul 2011 07:32:28 +0000 Subject: [PATCH] fix broken category search, selected cat=1 always, when only one category wasselected, as (int) of an array does not give the required/expected result --- calendar/inc/class.calendar_so.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_so.inc.php b/calendar/inc/class.calendar_so.inc.php index 359343e043..ba9ad89b7d 100644 --- a/calendar/inc/class.calendar_so.inc.php +++ b/calendar/inc/class.calendar_so.inc.php @@ -344,7 +344,7 @@ class calendar_so { $cats = $GLOBALS['egw']->categories->return_all_children($cat_id); array_walk($cats,create_function('&$val,$key','$val = (int) $val;')); - + if (is_array($cat_id) && count($cat_id)==1) $cat_id = $cat_id[0]; $sql = '(cal_category'.(count($cats) > 1 ? " IN ('".implode("','",$cats)."')" : '='.$this->db->quote((int)$cat_id)); foreach($cats as $cat) {