aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config_defaults.rb1
-rwxr-xr-xerror.cgi6
2 files changed, 6 insertions, 1 deletions
diff --git a/config_defaults.rb b/config_defaults.rb
index faf4dab..c4e8948 100644
--- a/config_defaults.rb
+++ b/config_defaults.rb
@@ -47,6 +47,7 @@ $conf.footer = []
$conf.errorlog = ""
$conf.bugreportmail = "Benjamin.Kellermann@gmx.de"
$conf.auto_send_report = false
+$conf.known_errors = []
$conf.indexnotice = <<INDEXNOTICE
<h2>Available Polls</h2>
diff --git a/error.cgi b/error.cgi
index 1b386d8..026fbee 100755
--- a/error.cgi
+++ b/error.cgi
@@ -63,8 +63,12 @@ end
$d.out
+known = false
+$conf.known_errors.each{|err|
+ known = true if errorstr.index(err)
+}
-if $conf.auto_send_report
+if $conf.auto_send_report && !known
tmpfile = "/tmp/error.#{rand(10000)}"
File.open(tmpfile,"w"){|f|
f << errorstr