Don't touch ejabberd.cfg if ejabberd_muclog_format is not set

This commit is contained in:
Ossi Salmi 2012-04-20 11:34:13 +03:00
parent c698eb72ef
commit eb0fb28ea2
2 changed files with 4 additions and 3 deletions

View file

@ -21,7 +21,7 @@
# Path where to store chatroom logs. Disabled by default. # Path where to store chatroom logs. Disabled by default.
# #
# $ejabberd_muclog_format: # $ejabberd_muclog_format:
# Chatroom log format. Valid values html or plaintext, defaults to html. # Chatroom log format. Valid values html or plaintext.
# #
class ejabberd { class ejabberd {
@ -36,8 +36,7 @@ class ejabberd {
} }
case $ejabberd_muclog_format { case $ejabberd_muclog_format {
"": { $ejabberd_muclog_format = "html" } "","html","plaintext": { }
"html","plaintext": { }
default: { default: {
fail("Invalid value ${ejabberd_muclog_format} for \$ejabberd_muclog_format.") fail("Invalid value ${ejabberd_muclog_format} for \$ejabberd_muclog_format.")
} }

View file

@ -583,7 +583,9 @@ user, host = admin.split("@") -%>
{access_log, muc}, {access_log, muc},
{outdir, "<%= ejabberd_muclog_datadir %>"}, {outdir, "<%= ejabberd_muclog_datadir %>"},
{dirtype, subdirs}, {dirtype, subdirs},
<% if has_variable?("ejabberd_muclog_format") -%>
{file_format, <%= ejabberd_muclog_format %>}, {file_format, <%= ejabberd_muclog_format %>},
<% end -%>
{cssfile, false}, {cssfile, false},
{top_link, {"/portal/", "Back to Portal"}} {top_link, {"/portal/", "Back to Portal"}}
]}, ]},