Mercurial > prosody-modules
comparison mod_http_index/mod_http_index.lua @ 5968:a1aa56ebe73f
mod_http_index: Fix loading template
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 08 Oct 2024 22:23:57 +0200 |
| parents | 28b386fc7a05 |
| children |
comparison
equal
deleted
inserted
replaced
| 5967:28b386fc7a05 | 5968:a1aa56ebe73f |
|---|---|
| 5 | 5 |
| 6 local show_all = module:get_option_boolean(module.name .. "_show_all", false); | 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_path(module.name .. "_template", module.name .. ".html", "html"); | 10 local template_file = module:get_option_path(module.name .. "_template", "html/" .. module.name .. ".html"); |
| 11 template_file = assert(io.open(template_file)); | 11 template_file = assert(io.open(template_file)); |
| 12 base_template = template_file:read("*a"); | 12 base_template = template_file:read("*a"); |
| 13 template_file:close(); | 13 template_file:close(); |
| 14 end | 14 end |
| 15 | 15 |
