Software /
code /
prosody-modules
Comparison
mod_http_index/mod_http_index.lua @ 3756:ba4f45b8678f
mod_http_index: Hide http apps that haven't set a title by default
This setting was meant to default to this but by some mistake defaulted
to true.
Apps that haven't set a title might not be meant to be user facing, so
hiding them makes sense.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 23 Nov 2019 04:48:25 +0100 |
parent | 3752:8992f84ca870 |
comparison
equal
deleted
inserted
replaced
3755:bb18a1f5e9d7 | 3756:ba4f45b8678f |
---|---|
1 local url = require"socket.url"; | 1 local url = require"socket.url"; |
2 local render = require"util.interpolation".new("%b{}", require"util.stanza".xml_escape); | 2 local render = require"util.interpolation".new("%b{}", require"util.stanza".xml_escape); |
3 | 3 |
4 module:depends"http"; | 4 module:depends"http"; |
5 | 5 |
6 local show_all = module:get_option_boolean(module.name .. "_show_all", true); | 6 local show_all = module:get_option_boolean(module.name .. "_show_all", false); |
7 | 7 |
8 local base_template; | 8 local base_template; |
9 do | 9 do |
10 local template_file = module:get_option_string(module.name .. "_template", module.name .. ".html"); | 10 local template_file = module:get_option_string(module.name .. "_template", module.name .. ".html"); |
11 template_file = assert(module:load_resource(template_file)); | 11 template_file = assert(module:load_resource(template_file)); |