From d509d7a16c4ee27dc3b0b1e8f0f7b868d354dc28 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 15 Feb 2008 03:45:47 +0000 Subject: [PATCH] Search box is only enabled when the server's full text index is enabled. --- citadel/citserver.c | 2 ++ citadel/modules/network/serv_network.c | 1 - webcit/roomops.c | 5 +++-- webcit/serv_func.c | 19 +++++++++---------- webcit/webcit.h | 1 + 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/citadel/citserver.c b/citadel/citserver.c index abfb31db2..5234f7d5d 100644 --- a/citadel/citserver.c +++ b/citadel/citserver.c @@ -314,6 +314,8 @@ void cmd_info(void) { #else cprintf("0\n"); /* no */ #endif + + cprintf("%d\n", config.c_enable_fulltext); cprintf("000\n"); } diff --git a/citadel/modules/network/serv_network.c b/citadel/modules/network/serv_network.c index 8dbb877fc..ee0152ced 100644 --- a/citadel/modules/network/serv_network.c +++ b/citadel/modules/network/serv_network.c @@ -863,7 +863,6 @@ int read_spoolcontrol_file(SpoolControl **scc, char *filename) char buf[SIZ]; char nodename[256]; char roomname[ROOMNAMELEN]; - char nexthop[256]; size_t miscsize = 0; size_t linesize = 0; int skipthisline = 0; diff --git a/webcit/roomops.c b/webcit/roomops.c index accf93e6d..bc87ee135 100644 --- a/webcit/roomops.c +++ b/webcit/roomops.c @@ -422,8 +422,9 @@ void embed_search_o_matic(void) { wprintf("\n", WC->nonce); wprintf(" \n" ); wprintf("\n"); diff --git a/webcit/serv_func.c b/webcit/serv_func.c index 589bc6540..0ce784cf0 100644 --- a/webcit/serv_func.c +++ b/webcit/serv_func.c @@ -1,21 +1,17 @@ /* * $Id$ */ -/** - * \defgroup ServFuncs Handles various types of data transfer operations with the Citadel service. - * \ingroup CitadelCommunitacion - */ -/*@{*/ #include "webcit.h" #include "webserver.h" struct serv_info serv_info; /**< our connection data to the server */ -/** - * \brief get info about the server we've connected to - * \param browser_host the citadell we want to connect to - * \param user_agent which browser uses our client? +/* + * get info about the server we've connected to + * + * browser_host the citadell we want to connect to + * user_agent which browser uses our client? */ void get_serv_info(char *browser_host, char *user_agent) { @@ -92,9 +88,12 @@ void get_serv_info(char *browser_host, char *user_agent) case 16: safestrncpy(serv_info.serv_default_cal_zone, buf, sizeof serv_info.serv_default_cal_zone); break; - case 19: + case 20: serv_info.serv_supports_sieve = atoi(buf); break; + case 21: + serv_info.serv_fulltext_enabled = atoi(buf); + break; } ++a; } diff --git a/webcit/webcit.h b/webcit/webcit.h index 9009b3507..7a430001e 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -247,6 +247,7 @@ struct serv_info { int serv_newuser_disabled; /* Has the server disabled self-service new user creation? */ char serv_default_cal_zone[128];/* Default timezone for unspecified calendar items */ int serv_supports_sieve; /* Does the server support Sieve mail filtering? */ + int serv_fulltext_enabled; /* Does the server have the full text index enabled? */ }; -- 2.39.2