Lines 144-149
Link Here
|
144 |
|
144 |
|
145 |
char *ctype; |
145 |
char *ctype; |
146 |
char *charset; |
146 |
char *charset; |
|
|
147 |
char *datetime_format; |
147 |
} autoindex_config_rec; |
148 |
} autoindex_config_rec; |
148 |
|
149 |
|
149 |
static char c_by_encoding, c_by_type, c_by_path; |
150 |
static char c_by_encoding, c_by_type, c_by_path; |
Lines 497-502
Link Here
|
497 |
else if (!strncasecmp(w, "Charset=", 8)) { |
498 |
else if (!strncasecmp(w, "Charset=", 8)) { |
498 |
d_cfg->charset = apr_pstrdup(cmd->pool, &w[8]); |
499 |
d_cfg->charset = apr_pstrdup(cmd->pool, &w[8]); |
499 |
} |
500 |
} |
|
|
501 |
else if (!strncasecmp(w, "UseOldDateFormat", 16)) { |
502 |
d_cfg->datetime_format = "%d-%b-%Y %H:%M"; |
503 |
} |
500 |
else { |
504 |
else { |
501 |
return "Invalid directory indexing option"; |
505 |
return "Invalid directory indexing option"; |
502 |
} |
506 |
} |
Lines 656-661
Link Here
|
656 |
|
660 |
|
657 |
new->ctype = add->ctype ? add->ctype : base->ctype; |
661 |
new->ctype = add->ctype ? add->ctype : base->ctype; |
658 |
new->charset = add->charset ? add->charset : base->charset; |
662 |
new->charset = add->charset ? add->charset : base->charset; |
|
|
663 |
new->datetime_format = add->datetime_format ? add->datetime_format : base->datetime_format; |
659 |
|
664 |
|
660 |
new->alt_list = apr_array_append(p, add->alt_list, base->alt_list); |
665 |
new->alt_list = apr_array_append(p, add->alt_list, base->alt_list); |
661 |
new->desc_list = apr_array_append(p, add->desc_list, base->desc_list); |
666 |
new->desc_list = apr_array_append(p, add->desc_list, base->desc_list); |
Lines 1509-1514
Link Here
|
1509 |
apr_pool_t *scratch; |
1514 |
apr_pool_t *scratch; |
1510 |
int name_width; |
1515 |
int name_width; |
1511 |
int desc_width; |
1516 |
int desc_width; |
|
|
1517 |
char *datetime_format; |
1512 |
char *name_scratch; |
1518 |
char *name_scratch; |
1513 |
char *pad_scratch; |
1519 |
char *pad_scratch; |
1514 |
char *breakrow = ""; |
1520 |
char *breakrow = ""; |
Lines 1517-1522
Link Here
|
1517 |
|
1523 |
|
1518 |
name_width = d->name_width; |
1524 |
name_width = d->name_width; |
1519 |
desc_width = d->desc_width; |
1525 |
desc_width = d->desc_width; |
|
|
1526 |
datetime_format = d->datetime_format ? d->datetime_format : "%Y-%m-%d %H:%M"; |
1520 |
|
1527 |
|
1521 |
if ((autoindex_opts & (FANCY_INDEXING | TABLE_INDEXING)) |
1528 |
if ((autoindex_opts & (FANCY_INDEXING | TABLE_INDEXING)) |
1522 |
== FANCY_INDEXING) { |
1529 |
== FANCY_INDEXING) { |
Lines 1756-1764
Link Here
|
1756 |
apr_time_exp_t ts; |
1763 |
apr_time_exp_t ts; |
1757 |
apr_time_exp_lt(&ts, ar[x]->lm); |
1764 |
apr_time_exp_lt(&ts, ar[x]->lm); |
1758 |
apr_strftime(time_str, &rv, sizeof(time_str), |
1765 |
apr_strftime(time_str, &rv, sizeof(time_str), |
1759 |
"%Y-%m-%d %H:%M ", |
1766 |
datetime_format, |
1760 |
&ts); |
1767 |
&ts); |
1761 |
ap_rvputs(r, "</td><td", (d->style_sheet != NULL) ? " class=\"indexcollastmod\">" : " align=\"right\">",time_str, NULL); |
1768 |
ap_rvputs(r, "</td><td", (d->style_sheet != NULL) ? " class=\"indexcollastmod\">" : " align=\"right\">", time_str, " ", NULL); |
1762 |
} |
1769 |
} |
1763 |
else { |
1770 |
else { |
1764 |
ap_rvputs(r, "</td><td", (d->style_sheet != NULL) ? " class=\"indexcollastmod\"> " : "> ", NULL); |
1771 |
ap_rvputs(r, "</td><td", (d->style_sheet != NULL) ? " class=\"indexcollastmod\"> " : "> ", NULL); |
Lines 1844-1851
Link Here
|
1844 |
apr_time_exp_t ts; |
1851 |
apr_time_exp_t ts; |
1845 |
apr_time_exp_lt(&ts, ar[x]->lm); |
1852 |
apr_time_exp_lt(&ts, ar[x]->lm); |
1846 |
apr_strftime(time_str, &rv, sizeof(time_str), |
1853 |
apr_strftime(time_str, &rv, sizeof(time_str), |
1847 |
"%Y-%m-%d %H:%M ", &ts); |
1854 |
datetime_format, |
1848 |
ap_rputs(time_str, r); |
1855 |
&ts); |
|
|
1856 |
ap_rvputs(r, time_str, " ", NULL); |
1849 |
} |
1857 |
} |
1850 |
else { |
1858 |
else { |
1851 |
/*Length="1975-04-07 01:23 " (see 4 lines above) */ |
1859 |
/*Length="1975-04-07 01:23 " (see 4 lines above) */ |