Mercurial > prosody-modules
comparison mod_muc_log_http/muc_log_http/mod_muc_log_http.lua @ 120:7a2d33e8ad1f
mod_muc_log_http: inverse year sort order
author | Thilo Cestonaro <thilo@cestona.ro> |
---|---|
date | Fri, 15 Jan 2010 10:17:57 +0100 |
parents | e6592d8305cb |
children | 445efff314c4 |
comparison
equal
deleted
inserted
replaced
119:e6592d8305cb | 120:7a2d33e8ad1f |
---|---|
305 room = nil | 305 room = nil |
306 end | 306 end |
307 end | 307 end |
308 if attributes ~= nil and room ~= nil then | 308 if attributes ~= nil and room ~= nil then |
309 local alreadyDoneYears = {}; | 309 local alreadyDoneYears = {}; |
310 for file in lfs.dir(path) do | 310 for folder in lfs.dir(path) do |
311 local year, month, day = file:match("^(%d%d)(%d%d)(%d%d)"); | 311 local year, month, day = folder:match("^(%d%d)(%d%d)(%d%d)"); |
312 if year ~= nil and alreadyDoneYears[year] == nil then | 312 if year ~= nil and alreadyDoneYears[year] == nil then |
313 days = days .. createYear(year, {callback=perDayCallback, path=path}); | 313 days = createYear(year, {callback=perDayCallback, path=path}) .. days; |
314 alreadyDoneYears[year] = true; | 314 alreadyDoneYears[year] = true; |
315 end | 315 end |
316 end | 316 end |
317 end | 317 end |
318 | 318 |