From: Dennis Schafroth Date: Mon, 16 Aug 2010 11:50:12 +0000 (+0200) Subject: Skip Facets: Check for empty string. And reset Facet settings X-Git-Tag: v1.5.0~52 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=f4141adedff2fa6c97243d19623a1bd879c5aee2;p=pazpar2-moved-to-github.git Skip Facets: Check for empty string. And reset Facet settings --- 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;