Accidentally merged the configdb branch into master. Reverting.
[citadel.git] / citadel / modules / fulltext / serv_fulltext.c
index 8029b758383bdfdc101127a4480fcf6abf297431..6288bfc9ab99adb0a240c99b739aab54da32622e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * This module handles fulltext indexing of the message base.
- * Copyright (c) 2005-2015 by the citadel.org team
+ * Copyright (c) 2005-2011 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as published
@@ -251,7 +251,7 @@ void do_fulltext_indexing(void) {
        /*
         * Don't do this if the site doesn't have it enabled.
         */
-       if (!CtdlGetConfigInt("c_enable_fulltext")) {
+       if (!config.c_enable_fulltext) {
                return;
        }
 
@@ -268,7 +268,7 @@ void do_fulltext_indexing(void) {
         * Check to see whether the fulltext index is up to date; if there
         * are no messages to index, don't waste any more time trying.
         */
-       if ((CitControl.MMfulltext >= CitControl.MMhighest) && (CitControl.MM_fulltext_wordbreaker == FT_WORDBREAKER_ID)) {
+       if ((CitControl.MMfulltext >= CitControl.MMhighest) && (CitControl.fulltext_wordbreaker == FT_WORDBREAKER_ID)) {
                return;         /* nothing to do! */
        }
        
@@ -280,9 +280,9 @@ void do_fulltext_indexing(void) {
         * over.
         */
        begin_critical_section(S_CONTROL);
-       if (CitControl.MM_fulltext_wordbreaker != FT_WORDBREAKER_ID) {
+       if (CitControl.fulltext_wordbreaker != FT_WORDBREAKER_ID) {
                syslog(LOG_DEBUG, "wb ver on disk = %d, code ver = %d",
-                       CitControl.MM_fulltext_wordbreaker, FT_WORDBREAKER_ID
+                       CitControl.fulltext_wordbreaker, FT_WORDBREAKER_ID
                );
                syslog(LOG_INFO, "(re)initializing full text index");
                cdb_trunc(CDB_FULLTEXT);
@@ -354,7 +354,7 @@ void do_fulltext_indexing(void) {
        ft_flush_cache();
        begin_critical_section(S_CONTROL);
        CitControl.MMfulltext = ft_newhighest;
-       CitControl.MM_fulltext_wordbreaker = FT_WORDBREAKER_ID;
+       CitControl.fulltext_wordbreaker = FT_WORDBREAKER_ID;
        put_control();
        end_critical_section(S_CONTROL);
        last_index = time(NULL);
@@ -455,7 +455,7 @@ void cmd_srch(char *argbuf) {
 
        if (CtdlAccessCheck(ac_logged_in)) return;
 
-       if (!CtdlGetConfigInt("c_enable_fulltext")) {
+       if (!config.c_enable_fulltext) {
                cprintf("%d Full text index is not enabled on this server.\n",
                        ERROR + CMD_NOT_SUPPORTED);
                return;
@@ -489,7 +489,7 @@ void ft_delete_remove(char *room, long msgnum)
        if (room) return;
        
        /* Remove from fulltext index */
-       if (CtdlGetConfigInt("c_enable_fulltext")) {
+       if (config.c_enable_fulltext) {
                ft_index_message(msgnum, 0);
        }
 }