diff --git a/computed_facets.module b/computed_facets.module index 9bf0a6aaa3aea11dece0bdcac1c856a73831fdcd..c27c9c37edcf8ee7f8cb07b9190b56c1e0d08368 100755 --- a/computed_facets.module +++ b/computed_facets.module @@ -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']); }