equal
deleted
inserted
replaced
38 template, err = template_file:read("*a"); |
38 template, err = template_file:read("*a"); |
39 template_file:close(); |
39 template_file:close(); |
40 end |
40 end |
41 if not template then |
41 if not template then |
42 module:log("error", "Error loading template: %s", err); |
42 module:log("error", "Error loading template: %s", err); |
43 template = render("<h1>mod_{module} could not read the template</h1><p>Tried to open <b>{filename}</b></p><pre>{error}</pre>", |
43 template = render("<h1>mod_{module} could not read the template</h1>\ |
|
44 <p>Tried to open <b>{filename}</b></p>\ |
|
45 <pre>{error}</pre>", |
44 { module = module.name, filename = template_filename, error = err }); |
46 { module = module.name, filename = template_filename, error = err }); |
45 end |
47 end |
46 end |
48 end |
47 |
49 |
48 -- local base_url = module:http_url() .. '/'; -- TODO: Generate links in a smart way |
50 -- local base_url = module:http_url() .. '/'; -- TODO: Generate links in a smart way |