Changeset

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 119:e6592d8305cb
children 121:a9898f13c89e
files mod_muc_log_http/muc_log_http/mod_muc_log_http.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mod_muc_log_http/muc_log_http/mod_muc_log_http.lua	Fri Jan 15 09:58:21 2010 +0100
+++ b/mod_muc_log_http/muc_log_http/mod_muc_log_http.lua	Fri Jan 15 10:17:57 2010 +0100
@@ -307,10 +307,10 @@
 	end
 	if attributes ~= nil and room ~= nil then
 		local alreadyDoneYears = {};
-		for file in lfs.dir(path) do
-			local year, month, day = file:match("^(%d%d)(%d%d)(%d%d)");
+		for folder in lfs.dir(path) do
+			local year, month, day = folder:match("^(%d%d)(%d%d)(%d%d)");
 			if year ~= nil and alreadyDoneYears[year] == nil then
-				days = days .. createYear(year, {callback=perDayCallback, path=path});
+				days = createYear(year, {callback=perDayCallback, path=path}) .. days;
 				alreadyDoneYears[year] = true;
 			end
 		end