Commit dc060631 authored by David Lesieur's avatar David Lesieur

Fixed empty result set when search key value is 0.

parent 5ff25cc7
......@@ -21,12 +21,10 @@ function computed_facets_cck_facets_collect(&$facets, $field, $domain, $env, $ar
case 'text':
// Scan the given search text for a '{field_name}:"{value}"'
// token, and create facets from it.
if ($computed = faceted_search_quoted_query_extract($arg, $field['field_name'])) {
if (!empty($computed)) {
// Create an active facet with the value found in the search text.
$category = new cck_facet_category($field, $computed);
$facets[] = new computed_facet($field, array($category));
}
if (!is_null($computed = faceted_search_quoted_query_extract($arg, $field['field_name']))) {
// Create an active facet with the value found in the search text.
$category = new cck_facet_category($field, $computed);
$facets[] = new computed_facet($field, array($category));
// Remove the parsed text
$arg = faceted_search_quoted_query_insert($arg, $field['field_name']);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment