Index: branches/unlabeled/unlabeled-1.2.50/kernel/units/general/helpers/search_helper.php =================================================================== diff -u -r4229 -r7942 --- branches/unlabeled/unlabeled-1.2.50/kernel/units/general/helpers/search_helper.php (.../search_helper.php) (revision 4229) +++ branches/unlabeled/unlabeled-1.2.50/kernel/units/general/helpers/search_helper.php (.../search_helper.php) (revision 7942) @@ -1,7 +1,6 @@ Application->makeClass('kMultipleFilter', FLT_TYPE_OR); + $excepts_and_filter =& $this->Application->makeClass('kMultipleFilter', FLT_TYPE_AND); + + $includes_or_filter_h =& $this->Application->makeClass('kMultipleFilter', FLT_TYPE_OR); + $excepts_and_filter_h =& $this->Application->makeClass('kMultipleFilter', FLT_TYPE_AND); + + if ($types) { + $types = explode(',', $types); + foreach ($types as $type) { + $type = trim($type); + + if (isset($type_clauses[$type])) { + if ($type_clauses[$type]['having_filter']) { + $includes_or_filter_h->addFilter('filter_'.$type, $type_clauses[$type]['include']); + } else { + $includes_or_filter->addFilter('filter_'.$type, $type_clauses[$type]['include']); + } + } + } + } + + if ($except_types) { + $except_types = explode(',', $except_types); + foreach ($except_types as $type) { + $type = trim($type); + + if (isset($type_clauses[$type])) { + if ($type_clauses[$type]['having_filter']) { + $excepts_and_filter_h->addFilter('filter_'.$type, $type_clauses[$type]['except']); + } else { + $excepts_and_filter->addFilter('filter_'.$type, $type_clauses[$type]['except']); + } + } + } + } + + $object =& $event->getObject(); + + $object->addFilter('includes_filter', $includes_or_filter); + $object->addFilter('excepts_filter', $excepts_and_filter); + + $object->addFilter('includes_filter_h', $includes_or_filter_h, HAVING_FILTER); + $object->addFilter('excepts_filter_h', $excepts_and_filter_h, HAVING_FILTER); + } } ?> \ No newline at end of file