Author: poeml Date: Wed Aug 12 02:40:14 2009 New Revision: 7754 URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?view=revision&revision=7754 Log: mod_autoindex_mb: - implement "Mirrors" and "Metalink" links for configurations with Apache's IndexOptions HTMLTable configured. Modified: trunk/mod_autoindex_mb/mod_autoindex_mb.c Modified: trunk/mod_autoindex_mb/mod_autoindex_mb.c ============================================================================== --- trunk/mod_autoindex_mb/mod_autoindex_mb.c Wed Aug 12 01:02:47 2009 (r7753) +++ trunk/mod_autoindex_mb/mod_autoindex_mb.c Wed Aug 12 02:40:14 2009 (r7754) _at_@ -1616,6 +1616,14 @@ colargs, static_columns); ++cols; } + if (autoindex_opts & MIRRORLIST) { + ap_rputs("</th><th>Mirrors", r); + ++cols; + } + if (autoindex_opts & METALINK) { + ap_rputs("</th><th>Metalinks", r); + ++cols; + } if (!(autoindex_opts & SUPPRESS_RULES)) { breakrow = apr_psprintf(r->pool, "<tr><th colspan=\"%d\">" _at_@ -1784,9 +1792,27 @@ desc_width), NULL); } } + else { + ap_rputs("</td><td> ", r); + } } - else { - ap_rputs("</td><td> ", r); + if (autoindex_opts & MIRRORLIST) { + if (anchor[strlen(anchor)-1] != '/') { /* not for directories */ + ap_rvputs(r, " </td><td><a href=\"", anchor, + "?mirrorlist\">Mirrors</a>", NULL); + } + else { + ap_rputs("</td><td> ", r); + } + } + if (autoindex_opts & METALINK) { + if (anchor[strlen(anchor)-1] != '/') { /* not for directories */ + ap_rvputs(r, " </td><td><a href=\"", anchor, + ".metalink\">Metalink</a>", NULL); + } + else { + ap_rputs("</td><td> ", r); + } } ap_rputs("</td></tr>\n", r); } _______________________________________________ mirrorbrain-commits mailing list Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/ Note: To remove yourself from this list, send a mail with the content unsubscribe to the address mirrorbrain-commits-request_at_mirrorbrain.orgReceived on Wed Aug 12 2009 - 00:40:16 GMT
This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT