Conditional_USER_HAS_PIC() was leaving the download file open, causing the actual...
authorArt Cancro <ajc@uncensored.citadel.org>
Wed, 14 Sep 2011 21:49:51 +0000 (17:49 -0400)
committerWilfried Goesgens <dothebart@citadel.org>
Fri, 16 Sep 2011 18:50:42 +0000 (18:50 +0000)
webcit/downloads.c
webcit/static/t/user/show.html
webcit/static/t/who/bio.html
webcit/useredit.c

index 993b075b2e6b0c8810a2036e4cca6a8666cb0022..9c1050522d5a043bcf13d57ec6a80a307f0ee969 100644 (file)
@@ -407,7 +407,10 @@ void output_image(void)
                        }
                }
                /* hm... unknown mimetype? fallback to blank gif */
-       } 
+       }
+       else { 
+               syslog(LOG_DEBUG, "OIMG failed: %s", ChrPtr(Buf));
+       }
 
        
        /*
index f25d231f0f44a3089dc9b33fdb77c86285226b9e..b957bd2525c782dfb397e589da521c617ac4804b 100644 (file)
@@ -15,7 +15,7 @@
        <center>
          <table>
            <tr><td>
-               <??("COND:USER:PIC", 1, B"who")><img src="image?name=_userpic_&amp;parm=<?BSTR("who", "U")>" alt=""><??("X", 1)>
+               <??("COND:USER:PIC", 1, B"who")><img src="image?name=_userpic_?parm=<?BSTR("who", "U")>" alt=""><??("X", 1)>
              </td><td><h1>
                  <?BSTR("who", "X")>
        </h1></td></tr>
index 127037af8665084b566ddf4e9c2caec9ab7abd6f..a1d599b7e91a9cac5e8575d4c9bf5dcc6a0e5062 100644 (file)
@@ -19,7 +19,7 @@
 <div id="content" class="service">
        <div id="bio_page">
                <div id="bio_pic">
-                               <img src="image?name=_userpic_&parm=<?WHO:NAME("X")>">
+                               <img src="image?name=_userpic_?parm=<?WHO:NAME("X")>">
                </div>
                <?!("X", 1)>
                <div id="bio_title"><h1><?WHO:NAME("X")></h1></div>
index d6d3a41ec2bbfcd783b3dbffe3befe1c6ee6fa34..ef72b6e201b5139909367e1048883aba884f1890 100644 (file)
@@ -481,6 +481,7 @@ int Conditional_USER_HAS_PIC(StrBuf *Target, WCTemplputParams *TP)
        StrBuf *Buf;
        const char *who;
        long len;
+       int r = 0;
 
        GetTemplateTokenString(Target, TP, 2, &who, &len);
 
@@ -488,15 +489,16 @@ int Conditional_USER_HAS_PIC(StrBuf *Target, WCTemplputParams *TP)
        serv_printf("OIMG _userpic_|%s", who);
        StrBuf_ServGetln(Buf);
        if (GetServerStatus(Buf, NULL) != 2) {
-               serv_puts("CLOS");
-               StrBuf_ServGetln(Buf);
-               GetServerStatus(Buf, NULL);
-               FreeStrBuf(&Buf);
-               return 1;
-       } else {
-               FreeStrBuf(&Buf);
-               return 0;
+               r = 1;
        }
+       else {
+               r = 0;
+       }
+       serv_puts("CLOS");
+       StrBuf_ServGetln(Buf);
+       GetServerStatus(Buf, NULL);
+       FreeStrBuf(&Buf);
+       return(r);
 }