Comparison

mod_http_index/mod_http_index.lua @ 2927:7953b7dde6e7

mod_http_index: Sort list of HTTP applications by name
author Kim Alvefur <zash@zash.se>
date Sat, 10 Mar 2018 05:01:15 +0100
parent 1827:9376e870f0e1
child 3336:4af114684e0a
comparison
equal deleted inserted replaced
2926:1dd1e5a1c707 2927:7953b7dde6e7
34 module = "mod_" .. item._provided_by; 34 module = "mod_" .. item._provided_by;
35 url = relative(canonical, module:http_url(item.name, item.default_path)); 35 url = relative(canonical, module:http_url(item.name, item.default_path));
36 }); 36 });
37 end 37 end
38 end 38 end
39 table.sort(http_apps, function (a, b) return a.name < b.name; end);
39 event.response.headers.content_type = "text/html"; 40 event.response.headers.content_type = "text/html";
40 return render(base_template, { 41 return render(base_template, {
41 title = "HTTP Apps"; 42 title = "HTTP Apps";
42 items = http_apps; 43 items = http_apps;
43 prosody_version = prosody.version; 44 prosody_version = prosody.version;