Browse Source

[mod_dirlisting] sort "../" to top (fixes #3109)

(thx otovalek)

x-ref:
  "mod_dirlisting javascript sort of ".." entries is broken"
  https://redmine.lighttpd.net/issues/3109
master
Glenn Strauss 2 months ago
parent
commit
1c41faaebc
  1. 4
      src/mod_dirlisting.c

4
src/mod_dirlisting.c

@ -703,8 +703,8 @@ static const char js_simple_table_resort[] = \
" var bt = get_inner_text(b.cells[sort_column]);\n" \
" var cmp;\n" \
" if (sort_column == name_column) {\n" \
" if (at == '..') return -1;\n" \
" if (bt == '..') return 1;\n" \
" if (at == '../') return -1;\n" \
" if (bt == '../') return 1;\n" \
" }\n" \
" if (a.cells[sort_column].className == 'int') {\n" \
" cmp = parseInt(at)-parseInt(bt);\n" \

Loading…
Cancel
Save