cleanup includes
[citadel.git] / citadel / euidindex.c
index 8bad12925557f072c6b713397337121624e0e7f5..7e5c735d06a2e267d2fd4f1a1bf2b039d8987284 100644 (file)
@@ -3,45 +3,11 @@
  */
 
 #include "sysdep.h"
-#include <stdlib.h>
-#include <unistd.h>
 #include <stdio.h>
-#include <fcntl.h>
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
-
-
-#include <ctype.h>
-#include <string.h>
-#include <limits.h>
-#include <errno.h>
-#include <stdarg.h>
-#include <sys/stat.h>
 #include <libcitadel.h>
-#include "citadel.h"
-#include "server.h"
-#include "database.h"
-#include "msgbase.h"
-#include "support.h"
-#include "sysdep_decls.h"
+
 #include "citserver.h"
 #include "room_ops.h"
-#include "user_ops.h"
-#include "file_ops.h"
-#include "config.h"
-#include "control.h"
-#include "euidindex.h"
-
-#include "ctdl_module.h"
 
 /*
  * The structure of an euidindex record *key* is:
@@ -74,6 +40,7 @@ int DoesThisRoomNeedEuidIndexing(struct ctdlroom *qrbuf) {
                case VIEW_TASKS:        return(1);
                case VIEW_NOTES:        return(1);
                case VIEW_WIKI:         return(1);
+               case VIEW_BLOG:         return(1);
        }
        
        return(0);
@@ -161,10 +128,10 @@ void rebuild_euid_index_for_msg(long msgnum, void *userdata) {
 
        msg = CtdlFetchMessage(msgnum, 0);
        if (msg == NULL) return;
-       if (msg->cm_fields['E'] != NULL) {
-               index_message_by_euid(msg->cm_fields['E'], &CC->room, msgnum);
+       if (!CM_IsEmpty(msg, eExclusiveID)) {
+               index_message_by_euid(msg->cm_fields[eExclusiveID], &CC->room, msgnum);
        }
-       CtdlFreeMessage(msg);
+       CM_Free(msg);
 }