Changeset

185:3bce55e453b1

merge
author Thilo Cestonaro <thilo@cestona.ro>
date Tue, 22 Jun 2010 11:03:27 +0200
parents 184:03cb7511ae54 (diff) 182:43d9e0944276 (current diff)
children 186:ba3837c565c9
files
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	Mon Jun 21 15:28:57 2010 +0800
+++ b/mod_muc_log_http/muc_log_http/mod_muc_log_http.lua	Tue Jun 22 11:03:27 2010 +0200
@@ -39,7 +39,7 @@
 * Default templates for the html output.
 ]]--
 local html = {};
-local theme = "prosody";
+local theme;
 
 local function checkDatastorePathExists(node, host, today, create)
 	create = create or false;
@@ -692,7 +692,7 @@
 function handle_request(method, body, request)
 	local node, host, day = splitUrl(request.url.path);
 	
-	if muc_hosts ~= nil then
+	if muc_hosts ~= nil and html.doc ~= nil then
 	 	if node ~= nil and host ~= nil then
 			local bare = node .. "@" .. host;
 			if prosody.hosts[host] ~= nil and prosody.hosts[host].muc ~= nil then
@@ -786,7 +786,7 @@
 		config.showJoin = true;
 	end
 
-	theme = config.theme or "default";
+	theme = config.theme or "prosody";
 	local themePath = themesParent .. "/" .. tostring(theme);
 	local attributes, err = lfs.attributes(themePath);
 	if attributes == nil or attributes.mode ~= "directory" then