Disable configuration of facets when no facet count is set.
authorDennis Schafroth <dennis@indexdata.com>
Mon, 16 Aug 2010 10:34:43 +0000 (12:34 +0200)
committerDennis Schafroth <dennis@indexdata.com>
Mon, 16 Aug 2010 10:34:43 +0000 (12:34 +0200)
src/client.c

index 5a73db2..8f4946d 100644 (file)
@@ -561,6 +561,9 @@ static int client_set_facets_request(struct client *cl, ZOOM_connection link) {
     struct session_database *sdb = client_get_database(cl);
     const char *opt_facet_term_sort  = session_setting_oneval(sdb, PZ_TERMLIST_TERM_SORT);
     const char *opt_facet_term_count = session_setting_oneval(sdb, PZ_TERMLIST_TERM_COUNT);
+    /* Disable when no count is set */
+    if (opt_facet_term_count == 0)
+        return 0;
     struct session *session = client_get_session(cl);
     struct conf_service *service = session->service;
     int num = service->num_metadata;