Search box is only enabled when the server's full text index is enabled.
authorArt Cancro <ajc@citadel.org>
Fri, 15 Feb 2008 03:45:47 +0000 (03:45 +0000)
committerArt Cancro <ajc@citadel.org>
Fri, 15 Feb 2008 03:45:47 +0000 (03:45 +0000)
citadel/citserver.c
citadel/modules/network/serv_network.c
webcit/roomops.c
webcit/serv_func.c
webcit/webcit.h

index abfb31db24c5c67ebdb2ea0296c38c0cdd34145f..5234f7d5d337c2ee3e93bfa53ee4cb7f725c6a89 100644 (file)
@@ -314,6 +314,8 @@ void cmd_info(void) {
 #else
        cprintf("0\n");         /* no */
 #endif
+
+       cprintf("%d\n", config.c_enable_fulltext);
        
        cprintf("000\n");
 }
index 8dbb877fc87a9f01add6dcf37e79d223f1186653..ee0152ced83bb86f3f1008d2fab1faee949342c0 100644 (file)
@@ -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;
index accf93e6dae453db9ac1b4aaddcd0858bdd2e89b..bc87ee135829bdab074ed914b3cc250afb70be33 100644 (file)
@@ -422,8 +422,9 @@ void embed_search_o_matic(void) {
        wprintf("<input type=\"hidden\" name=\"nonce\" value=\"%ld\">\n", WC->nonce);
        wprintf("<label for=\"search_name\">");
        wprintf(_("Search: "));
-       wprintf("</label> <input "
-               "type=\"text\" name=\"query\" size=\"15\" maxlength=\"128\" "
+       wprintf("</label> <input ");
+       wprintf("%s", serv_info.serv_fulltext_enabled ? "" : "disabled ");
+       wprintf("type=\"text\" name=\"query\" size=\"15\" maxlength=\"128\" "
                "id=\"search_name\" class=\"inputbox\">\n"
        );
        wprintf("</form>\n");
index 589bc6540bb53086d733541752d471a025ed5b47..0ce784cf057b4e6f1aaa37f5415eae252fbf89de 100644 (file)
@@ -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;
        }
index 9009b3507b23510ec09a9c00d814a4b95b0201f0..7a430001e8f9c7d50cf8d5cfc648de892d2beed4 100644 (file)
@@ -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? */
 };