Mail Index


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ApacheGallery] patch to allow sorting of directories



I wanted to sort some directories based off of their create date (instead of
their name).  (More usefull in .htaccess than httpd.conf)

See example: http://ck1.is-a-geek.org/pics/House

GalleryDirectotySortBy
  Instead of the default directory ordering you can sort by mtime or ctime.

217,218d216
<
<               my $dirsortby = $r->dir_config('GalleryDirectorySortBy');
220,224c218
<               if ($dirsortby && $dirsortby =~ m/^(mtime|ctime)$/) {
<                       @directories= map(/^\d+ (.*)/, sort
map(stat("$filename/$_")->$dirsortby." $_", @directories));
<               } else {
<       @directories = sort @directories;
<               }
---
>               @directories = sort @directories;
_______________________________________________
users mailing list
[email protected]
http://ufo.hestdesign.com/cgi-bin/mailman/listinfo/agusers