diff options
author | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2010-02-22 19:59:02 +0100 |
---|---|---|
committer | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2010-02-22 19:59:02 +0100 |
commit | 3a4dec369d7d3644ffdb097babe10e0431b1e9d6 (patch) | |
tree | abea2eb07f854449e60a153e1c1ec9fffdf01ddd | |
parent | 74dd6f509092e294baf7650b6c1a0fd1cde4be4a (diff) |
add option to disable autobugreport
-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 |