* fix room logo upload
authorWilfried Göesgens <willi@citadel.org>
Wed, 22 Jul 2009 20:25:39 +0000 (20:25 +0000)
committerWilfried Göesgens <willi@citadel.org>
Wed, 22 Jul 2009 20:25:39 +0000 (20:25 +0000)
webcit/graphics.c
webcit/roomops.c

index f283f34733874a3444e11da418a3f02714c28e5b..0a7097773d4851276efee732caee10c3938d2d5c 100644 (file)
@@ -157,16 +157,23 @@ void display_editgoodbyepic(void) {
 
 void display_editfloorpic(void) {
        char buf[SIZ];
-       snprintf(buf, SIZ, "UIMG 0|_floorpic_|%s",
+       snprintf(buf, SIZ, "_floorpic_|%s",
                 bstr("which_floor"));
        display_graphics_upload(_("the icon for this floor"),
                                buf,
                                "editfloorpic");
 }
 
+void editroompic(void) {
+       char buf[SIZ];
+       snprintf(buf, SIZ, "_roompic_|%s",
+                bstr("which_room"));
+       do_graphics_upload(buf);
+}
+
 void editfloorpic(void){
        char buf[SIZ];
-       snprintf(buf, SIZ, "UIMG 1|_floorpic_|%s",
+       snprintf(buf, SIZ, "_floorpic_|%s",
                 bstr("which_floor"));
        do_graphics_upload(buf);
 }
@@ -178,6 +185,7 @@ InitModule_GRAPHICS
        WebcitAddUrlHandler(HKEY("display_editpic"), display_editpic, 0);
        WebcitAddUrlHandler(HKEY("editpic"), editpic, 0);
        WebcitAddUrlHandler(HKEY("display_editroompic"), display_editroompic, 0);
+       WebcitAddUrlHandler(HKEY("editroompic"), editroompic, 0);
        WebcitAddUrlHandler(HKEY("display_edithello"), display_edithello, 0);
        WebcitAddUrlHandler(HKEY("edithellopic"), edithellopic, 0);
        WebcitAddUrlHandler(HKEY("display_editgoodbyepic"), display_editgoodbyepic, 0);
index 63ec7a0da39daea015677729f3f9b618fcc7a296..48497c9f6885f87bdfaa568380a284837b2425f4 100644 (file)
@@ -1342,7 +1342,9 @@ void display_editroom(void)
                wprintf("');\">\n");
                wprintf(_("Delete this room"));
                wprintf("</a>\n"
-                       "<li><a href=\"display_editroompic\">\n");
+                       "<li><a href=\"display_editroompic?which_room=");
+               urlescputs(ChrPtr(WC->wc_roomname));
+               wprintf("\">\n");
                wprintf(_("Set or change the icon for this room's banner"));
                wprintf("</a>\n"
                        "<li><a href=\"display_editinfo\">\n");