Allow to set optional dir listing sorting (ls) options with the config var: dir_listing_ls_opts

This commit is contained in:
Uriel 2009-01-20 06:55:17 +01:00
parent cee8d01d9b
commit a20b90f0cd

View file

@ -81,7 +81,7 @@ fn dir_listing_handler {
d=`{basename -d $1}
echo $d|sed 's,.*//,,g; s,/$,,; s,/, / ,g; s,.*,<h1 class="dir-list-head">&</h1> <ul class="dir-list">,'
# Symlinks suck: '/.' forces ls to list the linked dir if $d is a symlink.
ls -F $d/. | sed $dirfilter$dirclean' s,.*/([^/]+/?)$,<li><a href="\1">\1</a></li>,'
ls -F $dir_listing_ls_opts $d/. | sed $dirfilter$dirclean' s,.*/([^/]+/?)$,<li><a href="\1">\1</a></li>,'
echo '</ul>'
}