Project

General

Profile

patch2-src_mod_dirlisting.c.patch

fjo, 2017-10-02 11:38

Download (2.38 KB)

View differences:

src/mod_dirlisting.c
601 601
" }\n" \
602 602
" if (a.cells[sort_column].className == 'int') {\n" \
603 603
"  cmp = parseInt(at)-parseInt(bt);\n" \
604
" } else if (sort_column == date_column &&\n" \
605
"            a.cells[sort_column].hasAttribute(\"data-time\") &&\n" \
606
"            b.cells[sort_column].hasAttribute(\"data-time\")) {\n" \
607
"  var as = a.cells[sort_column].getAttribute(\"data-time\");\n" \
608
"  var bs = b.cells[sort_column].getAttribute(\"data-time\");\n" \
609
"  cmp = parseInt(as) - parseInt(bs);\n" \
604 610
" } else if (sort_column == date_column) {\n" \
605 611
"  cmp = Date.parse(at.replace(/-/g, '/'))\n" \
606 612
"      - Date.parse(bt.replace(/-/g, '/'));\n" \
......
1050 1056
		buffer_append_string_encoded(out, DIRLIST_ENT_NAME(tmp), tmp->namelen, ENCODING_REL_URI_PART);
1051 1057
		buffer_append_string_len(out, CONST_STR_LEN("/\">"));
1052 1058
		buffer_append_string_encoded(out, DIRLIST_ENT_NAME(tmp), tmp->namelen, ENCODING_MINIMAL_XML);
1053
		buffer_append_string_len(out, CONST_STR_LEN("</a>/</td><td class=\"m\">"));
1059
		buffer_append_string_len(out, CONST_STR_LEN("</a>/</td><td class=\"m\" data-time=\""));
1060
		buffer_append_int(out, tmp->mtime);
1061
		buffer_append_string_len(out, CONST_STR_LEN("\">"));
1054 1062
		buffer_append_string_len(out, datebuf, sizeof(datebuf) - 1);
1055 1063
		buffer_append_string_len(out, CONST_STR_LEN("</td><td class=\"s\">- &nbsp;</td><td class=\"t\">Directory</td></tr>\n"));
1056 1064

  
......
1098 1106
		buffer_append_string_encoded(out, DIRLIST_ENT_NAME(tmp), tmp->namelen, ENCODING_REL_URI_PART);
1099 1107
		buffer_append_string_len(out, CONST_STR_LEN("\">"));
1100 1108
		buffer_append_string_encoded(out, DIRLIST_ENT_NAME(tmp), tmp->namelen, ENCODING_MINIMAL_XML);
1101
		buffer_append_string_len(out, CONST_STR_LEN("</a></td><td class=\"m\">"));
1109
		buffer_append_string_len(out, CONST_STR_LEN("</a></td><td class=\"m\" data-time=\""));
1110
		buffer_append_int(out, tmp->mtime);
1111
		buffer_append_string_len(out, CONST_STR_LEN("\">"));
1102 1112
		buffer_append_string_len(out, datebuf, sizeof(datebuf) - 1);
1103 1113
		buffer_append_string_len(out, CONST_STR_LEN("</td><td class=\"s\">"));
1104 1114
		buffer_append_string(out, sizebuf);