You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rodent of Unusual Size <CO...@PROCESS.COM> on 1997/11/11 22:28:00 UTC

[PATCH] ReadmeName and !FancyIndexing (PR#1373)

    Here's a fix for PR #1373.  It makes sure that the file specified by
    ReadmeName is displayed in normal AND fancy directory listings.

    #ken    P-)}

Index: modules/standard/mod_autoindex.c
===================================================================
RCS file: /export/home/cvs/apachen/src/modules/standard/mod_autoindex.c,v
retrieving revision 1.55
diff -u -r1.55 mod_autoindex.c
--- mod_autoindex.c	1997/11/09 20:40:33	1.55
+++ mod_autoindex.c	1997/11/11 22:27:49
@@ -1100,12 +1100,13 @@
 		       direction);
     pclosedir(r->pool, d);
 
-    if (autoindex_opts & FANCY_INDEXING) {
-	if ((tmp = find_readme(autoindex_conf, r)))
-	    insert_readme(name, tmp, "", HRULE, END_MATTER, r);
-	else {
-	    rputs("</UL>", r);
-	}
+    if (!(autoindex_opts & FANCY_INDEXING)) {
+	rputs("</UL>", r);
+    }
+    if ((tmp = find_readme(autoindex_conf, r))) {
+	insert_readme(name, tmp, "",
+                      ((autoindex_opts & FANCY_INDEXING) ? HRULE : NO_HRULE),
+                      END_MATTER, r);
     }
     rputs("</BODY></HTML>\n", r);
 

Re: [PATCH] ReadmeName and !FancyIndexing (PR#1373)

Posted by Martin Kraemer <Ma...@mch.sni.de>.
On Tue, Nov 11, 1997 at 05:28:00PM -0400, Rodent of Unusual Size wrote:
>     Here's a fix for PR #1373.  It makes sure that the file specified by
>     ReadmeName is displayed in normal AND fancy directory listings.

-1  -- not for the README display though, but for the </UL>.
The </UL> at this position is bogus and should be deleted completely.
The correct </UL> appears at line 909 already.

    Martin

> Index: modules/standard/mod_autoindex.c
> -	else {
> -	    rputs("</UL>", r);
> -	}
> +    if (!(autoindex_opts & FANCY_INDEXING)) {
> +	rputs("</UL>", r);
> +    }
-- 
| S I E M E N S |  <Ma...@mch.sni.de>  |      Siemens Nixdorf
| ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
| N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request

Re: [PATCH] ReadmeName and !FancyIndexing (PR#1373)

Posted by Dean Gaudet <dg...@arctic.org>.
+1 ... fixes an inconsistency. 

Dean

On Tue, 11 Nov 1997, Rodent of Unusual Size wrote:

>     Here's a fix for PR #1373.  It makes sure that the file specified by
>     ReadmeName is displayed in normal AND fancy directory listings.
> 
>     #ken    P-)}
> 
> Index: modules/standard/mod_autoindex.c
> ===================================================================
> RCS file: /export/home/cvs/apachen/src/modules/standard/mod_autoindex.c,v
> retrieving revision 1.55
> diff -u -r1.55 mod_autoindex.c
> --- mod_autoindex.c	1997/11/09 20:40:33	1.55
> +++ mod_autoindex.c	1997/11/11 22:27:49
> @@ -1100,12 +1100,13 @@
>  		       direction);
>      pclosedir(r->pool, d);
>  
> -    if (autoindex_opts & FANCY_INDEXING) {
> -	if ((tmp = find_readme(autoindex_conf, r)))
> -	    insert_readme(name, tmp, "", HRULE, END_MATTER, r);
> -	else {
> -	    rputs("</UL>", r);
> -	}
> +    if (!(autoindex_opts & FANCY_INDEXING)) {
> +	rputs("</UL>", r);
> +    }
> +    if ((tmp = find_readme(autoindex_conf, r))) {
> +	insert_readme(name, tmp, "",
> +                      ((autoindex_opts & FANCY_INDEXING) ? HRULE : NO_HRULE),
> +                      END_MATTER, r);
>      }
>      rputs("</BODY></HTML>\n", r);
>  
>