diff options
-rw-r--r-- | config_sample.rb | 3 | ||||
-rwxr-xr-x | error.cgi | 15 |
2 files changed, 12 insertions, 6 deletions
diff --git a/config_sample.rb b/config_sample.rb index ed52300..917a1aa 100644 --- a/config_sample.rb +++ b/config_sample.rb @@ -38,6 +38,9 @@ SITEURL = "http://#{$cgi.server_name}#{$cgi.script_name.gsub(/[^\/]*$/,"")}" #ERRORLOG = "/var/log/dudle_error.log" BUGREPORTMAIL = "Benjamin.Kellermann@tu-dresden.de" +# Send bug reports automatically with the programm “mail” +AUTO_SEND_REPORT = false + # Add some Example Polls to the start page EXAMPLES = { "event_schedule_example" => "coffeebreak", @@ -91,12 +91,15 @@ $h << "</div></div>" $h.out($cgi) -tmpfile = "/tmp/error.#{rand(10000)}" -File.open(tmpfile,"w"){|f| - f << errorstr -} +if AUTO_SEND_REPORT + tmpfile = "/tmp/error.#{rand(10000)}" + File.open(tmpfile,"w"){|f| + f << errorstr + } -`mail -s "Bug in dudle" #{BUGREPORTMAIL} < #{tmpfile}` + `mail -s "Bug in dudle" #{BUGREPORTMAIL} < #{tmpfile}` -File.delete(tmpfile) + File.delete(tmpfile) + +end |