From 9cd327ec3b9efa44055c417dae722bc5375345b2 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 11 Apr 2016 11:27:02 -0400 Subject: [PATCH] Removed old userpic command from the citadel server , it doesnt work anymore --- citadel/modules/ctdlproto/serv_file.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/citadel/modules/ctdlproto/serv_file.c b/citadel/modules/ctdlproto/serv_file.c index 7f75b4e26..c1e97d2f6 100644 --- a/citadel/modules/ctdlproto/serv_file.c +++ b/citadel/modules/ctdlproto/serv_file.c @@ -246,25 +246,14 @@ void cmd_oimg(char *cmdbuf) return; } - if (!strcasecmp(filename, "_userpic_")) { - extract_token(which_user, cmdbuf, 1, '|', sizeof which_user); - if (CtdlGetUser(&usbuf, which_user) != 0) { - cprintf("%d No such user.\n", - ERROR + NO_SUCH_USER); - return; - } - snprintf(pathname, sizeof pathname, - "%s/%ld", - ctdl_usrpic_dir, - usbuf.usernum); - } else if (!strcasecmp(filename, "_floorpic_")) { + if (!strcasecmp(filename, "_floorpic_")) { which_floor = extract_int(cmdbuf, 1); - snprintf(pathname, sizeof pathname, - "%s/floor.%d", - ctdl_image_dir, which_floor); - } else if (!strcasecmp(filename, "_roompic_")) { + snprintf(pathname, sizeof pathname, "%s/floor.%d", ctdl_image_dir, which_floor); + } + else if (!strcasecmp(filename, "_roompic_")) { assoc_file_name(pathname, sizeof pathname, &CC->room, ctdl_image_dir); - } else { + } + else { for (a = 0; !IsEmptyStr(&filename[a]); ++a) { filename[a] = tolower(filename[a]); if ( (filename[a] == '/') || (filename[a] == '\\') ) { @@ -305,6 +294,7 @@ void cmd_oimg(char *cmdbuf) OpenCmdResult(pathname, GuessMimeType(&MimeTestBuf[0], 32)); } + /* * open a file for uploading */ -- 2.30.2