From f4141adedff2fa6c97243d19623a1bd879c5aee2 Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Mon, 16 Aug 2010 13:50:12 +0200 Subject: [PATCH] Skip Facets: Check for empty string. And reset Facet settings --- src/client.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client.c b/src/client.c index 8f4946d..6df84b2 100644 --- a/src/client.c +++ b/src/client.c @@ -562,8 +562,11 @@ static int client_set_facets_request(struct client *cl, ZOOM_connection link) { 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) + if (opt_facet_term_count == 0 || opt_facet_term_count[0] == '\0') { + yaz_log(YLOG_LOG, "Resetting ZOOM facets option to empty."); + ZOOM_connection_option_set(link, "facets", ""); return 0; + } struct session *session = client_get_session(cl); struct conf_service *service = session->service; int num = service->num_metadata; -- 1.7.10.4