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 993b075..9c10505 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 f25d231..b957bd2 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 127037a..a1d599b 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 d6d3a41..ef72b6e 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);
 }