Thank you for the patch. This will be fixed in 1.0.4a or 1.0.5

Achilleas Mantzios wrote:
> 
> By the time the
> printf("Content-Type: text/html; charset=%s\r\n", (LocalCharset.size()) ? 
>LocalCharset.c_str() : "iso-8859-1");
> is executed, no template has been read.
> 
> The patch is as follows:
> 
> 
>==========================================================================================================
> --- sc.cpp      Thu Mar 15 14:28:17 2001
> +++ sc.new.cpp  Thu Mar 15 14:26:12 2001
> @@ -145,12 +145,6 @@
>         InitRand();
>         InitCharset();
> 
> -       // Load query result template
> -       if (LoadTemplate(templ, cgiQuery.m_query_words.c_str()))
> -       {
> -               printf("<html><body>Can't open template file '%s'!</body></html>\n", 
>templ);
> -               return 0;
> -       }
>         // Output Content-Type if run under web server
>         // Some servers do not pass QUERY_STRING if the query was empty,
>         // so we check REQUEST_METHOD as well to be safe
> @@ -160,6 +154,12 @@
>                 printf("Content-Type: text/html; charset=%s\r\n", 
>(LocalCharset.size()) ? LocalCharset.c_str() : "iso-8859-1");
>                 if (cgiQuery.m_take == 0)
>                         printf("\r\n");
> +       }
> +       // Load query result template
> +       if (LoadTemplate(templ, cgiQuery.m_query_words.c_str()))
> +       {
> +               printf("<html><body>Can't open template file '%s'!</body></html>\n", 
>templ);
> +               return 0;
>         }
>         cgiQuery.FormQuery();
>         // Print TOP and if no query BOTTOM
> 
>==========================================================================================================
> 
> Sorry if this has been answered before.
> 
> --
> Á÷éëëÝáò ÌÜíôæéïò
> Application Developer
> Eurisko A.E.
> ÐéíäÜñïõ 9
> 106 71 ÁèÞíá
> Ôçë: +301 3633362
> Öáî: +301 3633074
> e-mail: [EMAIL PROTECTED]

--   [EMAIL PROTECTED]      http://kir.sever.net      ICQ 7551596   --
Answers: $1, short: $5, correct: $25, dumb questions are still free.

Reply via email to