IMPORTANT FIX TO VCARD / GLOBAL ADDRESS BOOK ROOM. VERSION UPDATE TO 8.03. DEPLOY... v8.03
authorArt Cancro <ajc@uncensored.citadel.org>
Tue, 6 Dec 2011 05:25:37 +0000 (00:25 -0500)
committerArt Cancro <ajc@uncensored.citadel.org>
Tue, 6 Dec 2011 05:25:37 +0000 (00:25 -0500)
citadel/citadel.h
citadel/configure.ac
citadel/debian/changelog
citadel/modules/vcard/serv_vcard.c
citadel/msgbase.c
citadel/techdoc/hack.txt

index 03c71a7eafdec32659c3506a682395a767e960b2..dbef91b2909ef40a171c710aad25d94746274d21 100644 (file)
@@ -51,7 +51,7 @@ extern "C" {
  * usually more strict because you're not really supposed to dump/load and
  * upgrade at the same time.
  */
-#define REV_LEVEL      802             /* This version */
+#define REV_LEVEL      803             /* This version */
 #define REV_MIN                591             /* Oldest compatible database */
 #define EXPORT_REV_MIN 760             /* Oldest compatible export files */
 #define LIBCITADEL_MIN 802             /* Minimum required version of libcitadel */
index 699ca744609550bdfbbc91f853d087d4ccfb2654..5a49e25ff1202d64cf1ac004da0643aec16be3e7 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.52)
-AC_INIT([Citadel], [8.02], [http://www.citadel.org/])
+AC_INIT([Citadel], [8.03], [http://www.citadel.org/])
 AC_REVISION([$Revision: 5108 $])
 AC_CONFIG_SRCDIR([citserver.c])
 AC_CONFIG_HEADER(sysdep.h)
index bc73b94e0bddda5f5e9ddee018412889113a3011..783e87420ef1720b790973466e7ab194c86f41d9 100644 (file)
@@ -1,3 +1,9 @@
+citadel (8.03-1) stable; urgency=low
+
+  * new upstream version
+
+ -- Wilfried Goesgens <w.goesgens@outgesourced.org>  Mon, 5 Dec 2011 22:00:00 +0001
+
 citadel (8.02-1) stable; urgency=low
 
   * new upstream version
index 9c62b0347e26a6829d395aa87f4efc60d0361be7..141a362e85e7212221df2c683adb2c101745eb76 100644 (file)
@@ -318,7 +318,6 @@ int vcard_upload_beforesave(struct CtdlMessage *msg) {
           && (!strcasecmp(&CC->room.QRname[11], USERCONFIGROOM)) ) {
                /* Yes, we want to do this */
                yes_my_citadel_config = 1;
-               syslog(LOG_DEBUG, "GAB: user config room detected");
 
 #ifdef VCARD_SAVES_BY_AIDES_ONLY
                /* Prevent non-aides from performing registration changes */
@@ -332,7 +331,6 @@ int vcard_upload_beforesave(struct CtdlMessage *msg) {
        /* Is this a room with an address book in it? */
        if (CC->room.QRdefaultview == VIEW_ADDRESSBOOK) {
                yes_any_vcard_room = 1;
-               syslog(LOG_DEBUG, "GAB: address book room detected");
        }
 
        /* If neither condition exists, don't run this hook. */
@@ -364,7 +362,6 @@ int vcard_upload_beforesave(struct CtdlMessage *msg) {
        }
 
        s = vcard_get_prop(v, "fn", 1, 0, 0);
-       if (s) syslog(LOG_DEBUG, "GAB: vCard beforesave hook running for <%s>\n", s);
 
        if (yes_my_citadel_config) {
                /* Bingo!  The user is uploading a new vCard, so
@@ -395,7 +392,6 @@ int vcard_upload_beforesave(struct CtdlMessage *msg) {
                 * vCard in the user's config room at all times.
                 *
                 */
-               syslog(LOG_DEBUG, "GAB: deleting old vCard for user");
                CtdlDeleteMessages(CC->room.QRname, NULL, 0, "[Tt][Ee][Xx][Tt]/.*[Vv][Cc][Aa][Rr][Dd]$");
 
                /* Make the author of the message the name of the user. */
@@ -471,7 +467,6 @@ int vcard_upload_beforesave(struct CtdlMessage *msg) {
 
        /* Now allow the save to complete. */
        vcard_free(v);
-       syslog(LOG_DEBUG, "GAB: save will proceed");
        return(0);
 }
 
@@ -500,17 +495,14 @@ int vcard_upload_aftersave(struct CtdlMessage *msg) {
 
        if ( (strlen(CC->room.QRname) >= 12) && (!strcasecmp(&CC->room.QRname[11], USERCONFIGROOM)) ) {
                is_UserConf = 1;        /* It's someone's config room */
-               syslog(LOG_DEBUG, "GAB: this is someone's config room");
        }
        CtdlMailboxName(roomname, sizeof roomname, &CC->user, USERCONFIGROOM);
        if (!strcasecmp(CC->room.QRname, roomname)) {
                is_UserConf = 1;
                is_MY_UserConf = 1;     /* It's MY config room */
-               syslog(LOG_DEBUG, "GAB: this is MY config room");
        }
        if (!strcasecmp(CC->room.QRname, ADDRESS_BOOK_ROOM)) {
                is_GAB = 1;             /* It's the Global Address Book */
-               syslog(LOG_DEBUG, "GAB: this is the Global Address Book");
        }
 
        if (!is_UserConf && !is_GAB) return(0);
@@ -529,9 +521,8 @@ int vcard_upload_aftersave(struct CtdlMessage *msg) {
                         * copy it to the Global Address Book room.
                         */
 
-                       I = atol(msg->cm_fields['I']);
-                       syslog(LOG_DEBUG, "GAB: \033[35m%s\033[0m", msg->cm_fields['I']);
-                       if (I < 0L) return(0);
+                       I = atol(msg->cm_fields['3']);
+                       if (I <= 0L) return(0);
 
                        /* Store our Internet return address in memory */
                        if (is_MY_UserConf) {
@@ -546,7 +537,6 @@ int vcard_upload_aftersave(struct CtdlMessage *msg) {
                        if (!is_GAB)
                        {       // This is not the GAB
                                /* Put it in the Global Address Book room... */
-                               syslog(LOG_DEBUG, "GAB: copying to Global Address Book");
                                CtdlSaveMsgPointerInRoom(ADDRESS_BOOK_ROOM, I, 1, msg);
                        }
 
index 3919cf911c93a2526d71fbb95edecef0e39b5375..68c94cca054f6794f839db089562124a0a1ea113 100644 (file)
@@ -2595,7 +2595,6 @@ int CtdlSaveMsgPointersInRoom(char *roomname, long newmsgidlist[], int num_newms
                "CtdlSaveMsgPointersInRoom(room=%s, num_msgs=%d, repl=%d, suppress_rca=%d)\n",
                roomname, num_newmsgs, do_repl_check, suppress_refcount_adj
        );
-       if (num_newmsgs > 0) for (i=0; i<num_newmsgs; ++i) syslog(LOG_DEBUG, "\033[33mmerge %ld\033[0m", newmsgidlist[i]);
 
        strcpy(hold_rm, CC->room.QRname);
 
@@ -2642,10 +2641,6 @@ int CtdlSaveMsgPointersInRoom(char *roomname, long newmsgidlist[], int num_newms
                }
                if (unique) {
                        msgs_to_be_merged[num_msgs_to_be_merged++] = newmsgidlist[i];
-                       syslog(LOG_DEBUG, "\033[32mmsg %ld is being merged\033[0m", newmsgidlist[i]);
-               }
-               else {
-                       syslog(LOG_DEBUG, "\033[31mmsg %ld is not unique\033[0m", newmsgidlist[i]);
                }
        }
 
@@ -3222,14 +3217,18 @@ long CtdlSubmitMsg(struct CtdlMessage *msg,     /* message to save */
                        }
                        else {
                                syslog(LOG_DEBUG, "No user <%s>\n", recipient);
-                               CtdlSaveMsgPointerInRoom(config.c_aideroom,
-                                                        newmsgid, 0, msg);
+                               CtdlSaveMsgPointerInRoom(config.c_aideroom, newmsgid, 0, msg);
                        }
                }
 
        /* Perform "after save" hooks */
        syslog(LOG_DEBUG, "Performing after-save hooks\n");
+       if (msg->cm_fields['3'] != NULL) free(msg->cm_fields['3']);
+       msg->cm_fields['3'] = malloc(20);
+       snprintf(msg->cm_fields['3'], 20, "%ld", newmsgid);
        PerformMessageHooks(msg, EVT_AFTERSAVE);
+       free(msg->cm_fields['3']);
+       msg->cm_fields['3'] = NULL;
 
        /* For IGnet mail, we have to save a new copy into the spooler for
         * each recipient, with the R and D fields set to the recipient and
index 38d09f4f6c33cf9e134ebcc412253b3a435b480d..f75f596f8db4e438f422675df2383d579cc93ff9 100644 (file)
@@ -291,6 +291,8 @@ Y   carbon copY     Optional, and only in Mail messages.
 1      suppress index  The presence of this field indicates that the message is
                        disqualified from being added to the full text index.
 2      extnotify       Used internally by the serv_extnotify module.
+3      msgnum          Used internally to pass the local message number in the
+                       database to after-save hooks.  Discarded afterwards.
   
                        EXAMPLE