httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@hyperreal.org
Subject cvs commit: apachen/src CHANGES
Date Sun, 09 Nov 1997 05:49:26 GMT
coar        97/11/08 21:49:26

  Modified:    src/modules/standard mod_autoindex.c
               htdocs/manual/mod mod_autoindex.html
               src      CHANGES
  Log:
  	Add a "SuppressColumnSorting" option to the IndexOptions list,
  	which will keep the column heading from beling links for sorting
  	the display.
  
  PR:		1261
  Reviewed by:	Jim Jagielski, Martin Kraemer, Dean Gaudet
  
  Revision  Changes    Path
  1.54      +25 -7     apachen/src/modules/standard/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_autoindex.c,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- mod_autoindex.c	1997/10/22 20:30:17	1.53
  +++ mod_autoindex.c	1997/11/09 05:49:21	1.54
  @@ -88,6 +88,7 @@
   #define SUPPRESS_SIZE 16
   #define SUPPRESS_DESC 32
   #define SUPPRESS_PREAMBLE 64
  +#define SUPPRESS_COLSORT 128
   
   /*
    * Define keys for sorting.
  @@ -270,6 +271,9 @@
   	    opts |= SUPPRESS_DESC;
   	else if (!strcasecmp(w, "SuppressHTMLPreamble"))
   	    opts |= SUPPRESS_PREAMBLE;
  +        else if (!strcasecmp(w, "SuppressColumnSorting")) {
  +            opts |= SUPPRESS_COLSORT;
  +	}
   	else if (!strcasecmp(w, "None"))
   	    opts = 0;
   	else if (!strncasecmp(w, "IconWidth", 9)) {
  @@ -743,11 +747,12 @@
    * selected again.  Non-active fields always start in ascending order.
    */
   static void emit_link(request_rec *r, char *anchor, char fname, char curkey,
  -		      char curdirection)
  +                      char curdirection, int nosort)
   {
       char qvalue[5];
       int reverse;
   
  +    if (!nosort) {
       qvalue[0] = '?';
       qvalue[1] = fname;
       qvalue[2] = '=';
  @@ -756,6 +761,10 @@
       qvalue[3] = reverse ? D_DESCENDING : D_ASCENDING;
       rvputs(r, "<A HREF=\"", qvalue, "\">", anchor, "</A>", NULL);
   }
  +    else {
  +        rputs(anchor, r);
  +    }
  +}
   
   static void output_directories(struct ent **ar, int n,
   			       autoindex_config_rec * d, request_rec *r,
  @@ -764,6 +773,7 @@
       int x, len;
       char *name = r->uri;
       char *tp;
  +    int static_columns = (autoindex_opts & SUPPRESS_COLSORT);
       pool *scratch = make_sub_pool(r->pool);
   
       if (name[0] == '\0')
  @@ -785,18 +795,20 @@
   	    }
   	    rputs("> ", r);
   	}
  -	emit_link(r, "Name", K_NAME, keyid, direction);
  +        emit_link(r, "Name", K_NAME, keyid, direction, static_columns);
   	rputs("                   ", r);
   	if (!(autoindex_opts & SUPPRESS_LAST_MOD)) {
  -	    emit_link(r, "Last modified", K_LAST_MOD, keyid, direction);
  +            emit_link(r, "Last modified", K_LAST_MOD, keyid, direction,
  +                      static_columns);
   	    rputs("     ", r);
   	}
   	if (!(autoindex_opts & SUPPRESS_SIZE)) {
  -	    emit_link(r, "Size", K_SIZE, keyid, direction);
  +            emit_link(r, "Size", K_SIZE, keyid, direction, static_columns);
   	    rputs("  ", r);
   	}
   	if (!(autoindex_opts & SUPPRESS_DESC)) {
  -	    emit_link(r, "Description", K_DESC, keyid, direction);
  +            emit_link(r, "Description", K_DESC, keyid, direction,
  +                      static_columns);
   	}
   	rputs("\n<HR>\n", r);
       }
  @@ -1027,11 +1039,16 @@
       /*
        * Figure out what sort of indexing (if any) we're supposed to use.
        */
  +    if (autoindex_opts & SUPPRESS_COLSORT) {
  +	keyid = K_NAME;
  +	direction = D_ASCENDING;
  +    }
  +    else {
       qstring = r->args;
   
       /*
  -     * If no QUERY_STRING was specified, we use the default: ascending  by
  -     * name.
  +	 * If no QUERY_STRING was specified, we use the default: ascending
  +	 * by name.
        */
       if ((qstring == NULL) || (*qstring == '\0')) {
   	keyid = K_NAME;
  @@ -1046,6 +1063,7 @@
   	else {
   	    direction = D_ASCENDING;
   	}
  +    }
       }
   
       /* 
  
  
  
  1.14      +8 -0      apachen/htdocs/manual/mod/mod_autoindex.html
  
  Index: mod_autoindex.html
  ===================================================================
  RCS file: /export/home/cvs/apachen/htdocs/manual/mod/mod_autoindex.html,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- mod_autoindex.html	1997/09/09 15:19:48	1.13
  +++ mod_autoindex.html	1997/11/09 05:49:23	1.14
  @@ -334,6 +334,14 @@
   indexing. If the file does not have a description given by
   <A HREF="#adddescription">AddDescription</A> then httpd will read the
   document for the value of the TITLE tag.  This is CPU and disk intensive.
  +<DT>SuppressColumnSorting
  +<DD>
  +<!--%plaintext &lt;?INDEX {\tt SuppressColumnSorting} index option&gt; -->
  +If specified, Apache will not make the column headings in a FancyIndexed
  +directory listing into links for sorting.  The default behaviour is
  +for them to be links; selecting the column heading will sort the directory
  +listing by the values in that column.
  +<STRONG>Only available in Apache 1.3 and later.</STRONG>
   <dt>SuppressDescription
   <dd>
   <!--%plaintext &lt;?INDEX {\tt SuppressDescription} index option&gt; -->
  
  
  
  1.500     +5 -0      apachen/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/CHANGES,v
  retrieving revision 1.499
  retrieving revision 1.500
  diff -u -r1.499 -r1.500
  --- CHANGES	1997/11/08 21:47:32	1.499
  +++ CHANGES	1997/11/09 05:49:24	1.500
  @@ -1,5 +1,10 @@
   Changes with Apache 1.3b3
   
  +  *) Add a "SuppressColumnSorting" option to the IndexOptions list,
  +     which will keep the column heading from beling links for sorting
  +     the display.  [Ken Coar, suggested by Brian Tiemann <btman@pacific.net>]
  +     PR #1261
  +
     *) PORT: Update the LynxOS port.  [Marius Groeger <mag@sysgo.de>]
   
     *) Fix logic error when issuing a mmap() failed message
  
  
  

Mime
View raw message