Comparison

mod_invites_register_web/mod_invites_register_web.lua @ 5660:8a607be2cdcc

mod_invites_register_web: change config option from `invites_html_template` to `invites_template_html`.
author Trần H. Trung <xmpp:trần.h.trung@trung.fun>
date Tue, 29 Aug 2023 22:05:46 +0700
parent 5640:5e7e609fae0c
child 6273:8ceedc336d0d
comparison
equal deleted inserted replaced
5640:5e7e609fae0c 5660:8a607be2cdcc
32 module:depends("http"); 32 module:depends("http");
33 33
34 local invites = module:depends("invites"); 34 local invites = module:depends("invites");
35 local invites_page = module:depends("invites_page"); 35 local invites_page = module:depends("invites_page");
36 36
37 local templatePath = module:get_option_string("invites_html_template", "html"); 37 local templatePath = module:get_option_string("invites_template_html", "html");
38 function template_get(sTemplate, sLang) 38 function template_get(sTemplate, sLang)
39 local template = sLang and templatePath.."/"..sTemplate.."."..sLang..".html" 39 local template = sLang and templatePath.."/"..sTemplate.."."..sLang..".html"
40 or templatePath.."/"..sTemplate..".html"; 40 or templatePath.."/"..sTemplate..".html";
41 return assert(module:load_resource(template):read("*a")); 41 return assert(module:load_resource(template):read("*a"));
42 end 42 end