]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/ctdlproto/serv_file.c
Removed the _floorpic_ infrastructure entirely -- we don't use those anymore.
[citadel.git] / citadel / modules / ctdlproto / serv_file.c
index 7f75b4e2647562b1d5dd6741fcf45708893a706f..2358507995be413a249c2d876c28332f00fd25ed 100644 (file)
@@ -1,7 +1,7 @@
 /* 
  * Server functions which handle file transfers and room directories.
  *
- * Copyright (c) 1987-2015 by the citadel.org team
+ * Copyright (c) 1987-2016 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 version 3.
@@ -223,12 +223,9 @@ void cmd_open(char *cmdbuf)
  */
 void cmd_oimg(char *cmdbuf)
 {
-       char filename[256];
+       char filename[PATH_MAX];
        char pathname[PATH_MAX];
        char MimeTestBuf[32];
-       struct ctdluser usbuf;
-       char which_user[USERNAME_SIZE];
-       int which_floor;
        int a;
        int rv;
 
@@ -246,25 +243,10 @@ 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_")) {
-               which_floor = extract_int(cmdbuf, 1);
-               snprintf(pathname, sizeof pathname,
-                                "%s/floor.%d",
-                                ctdl_image_dir, which_floor);
-       } else if (!strcasecmp(filename, "_roompic_")) {
+       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 +287,7 @@ void cmd_oimg(char *cmdbuf)
        OpenCmdResult(pathname, GuessMimeType(&MimeTestBuf[0], 32));
 }
 
+
 /*
  * open a file for uploading
  */
@@ -377,7 +360,6 @@ void cmd_uimg(char *cmdbuf)
 {
        int is_this_for_real;
        char basenm[256];
-       int which_floor;
        int a;
 
        if (num_parms(cmdbuf) < 2) {
@@ -410,22 +392,6 @@ void cmd_uimg(char *cmdbuf)
                                 basenm);
        }
 
-       if (!strcasecmp(basenm, "_userpic_")) {
-               snprintf(CC->upl_path, sizeof CC->upl_path,
-                                "%s/%ld.gif",
-                                ctdl_usrpic_dir,
-                                CC->user.usernum);
-       }
-
-       if ((!strcasecmp(basenm, "_floorpic_"))
-           && (CC->user.axlevel >= AxAideU)) {
-               which_floor = extract_int(cmdbuf, 2);
-               snprintf(CC->upl_path, sizeof CC->upl_path,
-                                "%s/floor.%d.gif",
-                                ctdl_image_dir,
-                                which_floor);
-       }
-
        if ((!strcasecmp(basenm, "_roompic_")) && (is_room_aide())) {
                assoc_file_name(CC->upl_path, sizeof CC->upl_path, &CC->room, ctdl_image_dir);
        }