X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fimap%2Fimap_metadata.c;h=5d5e95f9c0225695f48621e62f3eb1ee5e4e0c90;hb=7a9b0685e406cc83597171cc39d008c7e5459ca8;hp=cfbc10370675609cf5bbd8d953baaae9879e8e73;hpb=d9a896503ba54a3b0b3c95059bac85541ba55090;p=citadel.git diff --git a/citadel/modules/imap/imap_metadata.c b/citadel/modules/imap/imap_metadata.c index cfbc10370..5d5e95f9c 100644 --- a/citadel/modules/imap/imap_metadata.c +++ b/citadel/modules/imap/imap_metadata.c @@ -3,21 +3,21 @@ * * This is an implementation of the Bynari variant of the METADATA extension. * - * Copyright (c) 2007-2009 by the citadel.org team + * Copyright (c) 2007-2017 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 by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * 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 by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -30,18 +30,7 @@ #include #include #include - -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - +#include #include #include #include @@ -147,7 +136,7 @@ void imap_setmetadata(int num_parms, ConstStr *Params) { if (IMAP->selected) { strcpy(savedroom, CC->room.QRname); } - CtdlUserGoto(roomname, 0, 0, &msgs, &new); + CtdlUserGoto(roomname, 0, 0, &msgs, &new, NULL, NULL); /* * Always set the per-user view to the requested one. @@ -187,7 +176,7 @@ void imap_setmetadata(int num_parms, ConstStr *Params) { * If a different folder was previously selected, return there now. */ if ( (IMAP->selected) && (strcasecmp(roomname, savedroom)) ) { - CtdlUserGoto(savedroom, 0, 0, &msgs, &new); + CtdlUserGoto(savedroom, 0, 0, &msgs, &new, NULL, NULL); } return; } @@ -206,11 +195,13 @@ void imap_getmetadata(int num_parms, ConstStr *Params) { int ret; int found = 0; +/* this doesn't work if you have rooms/floors with spaces. + we need this for the bynari connector. if (num_parms > 5) { IReply("BAD usage error"); return; } - +*/ ret = imap_grabroom(roomname, Params[2].Key, 1); if (ret != 0) { IReply("NO Invalid mailbox name or access denied"); @@ -224,7 +215,7 @@ void imap_getmetadata(int num_parms, ConstStr *Params) { if (IMAP->selected) { strcpy(savedroom, CC->room.QRname); } - CtdlUserGoto(roomname, 0, 0, &msgs, &new); + CtdlUserGoto(roomname, 0, 0, &msgs, &new, NULL, NULL); IAPuts("* METADATA "); IPutCParamStr(2); @@ -302,7 +293,7 @@ void imap_getmetadata(int num_parms, ConstStr *Params) { * If a different folder was previously selected, return there now. */ if ( (IMAP->selected) && (strcasecmp(roomname, savedroom)) ) { - CtdlUserGoto(savedroom, 0, 0, &msgs, &new); + CtdlUserGoto(savedroom, 0, 0, &msgs, &new, NULL, NULL); } IReply("OK GETMETADATA complete");