summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Lesieur2009-05-01 20:35:18 (GMT)
committerDavid Lesieur2009-05-01 20:35:18 (GMT)
commitdc060631fe0634794dff463ba010f73d58e44583 (patch)
tree9da1811ab0ab85dd6108cd2c2fe2f913a5458579
parent5ff25cc73f7ec7c6b0e5ecb18b58d021ad262770 (diff)
Fixed empty result set when search key value is 0.
-rwxr-xr-xcomputed_facets.module10
1 files changed, 4 insertions, 6 deletions
diff --git a/computed_facets.module b/computed_facets.module
index 9bf0a6a..c27c9c3 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']);
}