Mercurial > prosody-modules
comparison mod_muc_log_http/muc_log_http/mod_muc_log_http.lua @ 343:845a59c99b4d
mod_muc_log_http: Fix iterator usage and indentation in loadTheme() (thanks tanget128)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 03 Mar 2011 15:27:39 +0000 |
parents | 8cd2fab3135a |
children | 2b0f2160fc61 |
comparison
equal
deleted
inserted
replaced
342:8e9e5c7d97ff | 343:845a59c99b4d |
---|---|
765 f:close() | 765 f:close() |
766 return t; | 766 return t; |
767 end | 767 end |
768 | 768 |
769 local function loadTheme(path) | 769 local function loadTheme(path) |
770 local iter = lfs.dir(path); | 770 for file in lfs.dir(path) do |
771 for file in iter do | 771 if file ~= "." and file ~= ".." then |
772 if file ~= "." and file ~= ".." then | |
773 module:log("debug", "opening theme file: " .. file); | 772 module:log("debug", "opening theme file: " .. file); |
774 local tmp = split(file:gsub("\.html$", ""), "_"); | 773 local tmp = split(file:gsub("\.html$", ""), "_"); |
775 local content = readFile(path .. "/" .. file); | 774 local content = readFile(path .. "/" .. file); |
776 assign(tmp, content); | 775 assign(tmp, content); |
777 end | 776 end |