* fix the files application
authorWilfried Göesgens <willi@citadel.org>
Wed, 15 Jul 2009 22:18:25 +0000 (22:18 +0000)
committerWilfried Göesgens <willi@citadel.org>
Wed, 15 Jul 2009 22:18:25 +0000 (22:18 +0000)
webcit/downloads.c
webcit/static/t/files.html
webcit/static/t/section_files_onefile.html

index 03b7b8fc72397eaf02c3ed4fe558f75d5877a973..28fcbe80fb1fb8a576f064b793ca6c885385148b 100644 (file)
@@ -280,6 +280,7 @@ void download_file(void)
 
 void delete_file(void)
 {
+       const StrBuf *MimeType;
        StrBuf *Buf;
        char buf[256];
        
@@ -291,9 +292,8 @@ void delete_file(void)
        GetServerStatus(Buf, NULL);
        StrBufCutLeft(Buf, 4);
        strcpy(WC->ImportantMessage, ChrPtr(Buf));
-       do_template("files", CTX_NONE);
-       output_headers(0, 0, 0, 0, 0, 0);
-       end_burst();
+       MimeType = DoTemplate(HKEY("files"), NULL, &NoCtx);
+       http_transmit_thing(ChrPtr(MimeType), 0);
        FreeStrBuf(&Buf);
 }
 
@@ -301,6 +301,7 @@ void delete_file(void)
 
 void upload_file(void)
 {
+       const StrBuf *RetMimeType;
        const char *MimeType;
        char buf[1024];
        long bytes_transmitted = 0;
@@ -313,9 +314,8 @@ void upload_file(void)
        if (buf[0] != '2')
        {
                strcpy(WCC->ImportantMessage, &buf[4]);
-               do_template("files", NULL);
-               output_headers(0, 0, 0, 0, 0, 0);
-               end_burst();
+               RetMimeType = DoTemplate(HKEY("files"), NULL, &NoCtx);
+               http_transmit_thing(ChrPtr(RetMimeType), 0);
                return;
        }
 
@@ -339,9 +339,8 @@ void upload_file(void)
        serv_puts("UCLS 1");
        serv_getln(buf, sizeof buf);
        strcpy(WCC->ImportantMessage, &buf[4]);
-       do_template("files", CTX_NONE);
-       output_headers(0, 0, 0, 0, 0, 0);
-       end_burst();
+       RetMimeType = DoTemplate(HKEY("files"), NULL, &NoCtx);
+       http_transmit_thing(ChrPtr(RetMimeType), 0);
 }
 
 
index 839f90e00c39c1bbae951a06ba8099fdfd62e8dc..5cda728ec664dca68839564ab8258619c9605807 100644 (file)
@@ -28,7 +28,7 @@
 
 
 
-<??("COND:ROOM:FLAGS:QR_UPLOAD", 2)>
+<?!("COND:ROOM:FLAGS:QR_UPLOAD", 2)>
 <hr>
 <form enctype="multipart/form-data" method="POST" accept-charset="UTF-8" action="upload_file" name="upload_file_form">
 <input type="hidden" name="nonce" value="<?NONCE>">
index 545ef00a97372af00599d028e5587b49e25a2aec..91aa36374f0c7246374817edf98fb2608f781f19 100644 (file)
@@ -16,7 +16,7 @@
 
 <?!("COND:ITERATE:LASTN", 2)>
 </table>
-<??("COND:FILE:ISPIC", 3)>
+<?!("COND:FILE:ISPIC", 3)>
 <div class="buttons"><a href="do_template?template=files_jspicview&frame=1"><?_("Slideshow")></a></div>
 <??("X", 3)>
 <?!("X", 2)>