From 451383433d842f4a6734573a37aaf9098dd245c7 Mon Sep 17 00:00:00 2001 From: Benjamin Kellermann Date: Mon, 18 Apr 2011 08:52:02 +0200 Subject: complete change of configuration --- error.cgi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'error.cgi') diff --git a/error.cgi b/error.cgi index a9e342c..3e192a7 100755 --- a/error.cgi +++ b/error.cgi @@ -32,11 +32,11 @@ def urlescape(str) end -if defined?(ERRORLOG) +if File.exists?($conf.errorlog) begin - a = File.open(ERRORLOG,"r").to_a + a = File.open($conf.errorlog,"r").to_a rescue Exception => e - errorstr = "Exception while opening #{ERRORLOG}:\n#{e}" + errorstr = "Exception while opening #{$conf.errorlog}:\n#{e}" else s = [a.pop] s << a.pop while s.last.scan(/^\[([^\]]*)\] \[/).flatten[0] == a.last.scan(/^\[([^\]]*)\] \[/).flatten[0] || a.last =~ /^[^\[]/ @@ -47,10 +47,10 @@ if defined?(ERRORLOG) end - errormessagebody = _("Hi!\n\nI found a bug in your application at %{urlofsite}.\nI did the following:\n\n\n\n\nI am using \n%{errormessage}\nYours,\n") % {:errormessage => errormessage, :urlofsite => SITEURL} + errormessagebody = _("Hi!\n\nI found a bug in your application at %{urlofsite}.\nI did the following:\n\n\n\n\nI am using \n%{errormessage}\nYours,\n") % {:errormessage => errormessage, :urlofsite => $conf.siteurl} subject = _("Bug in dudle") - $d << _("An error occured while executing dudle.
Please send an error report, including your browser, operating system, and what you did to %{admin}.") % {:admin => "#{BUGREPORTMAIL}"} + $d << _("An error occured while executing dudle.
Please send an error report, including your browser, operating system, and what you did to %{admin}.") % {:admin => "#{$conf.bugreportmail}"} if (errorstr) errorheadstr = _("Please include the following as well:") @@ -64,13 +64,13 @@ end $d.out -if AUTO_SEND_REPORT +if $conf.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" #{$conf.bugreportmail} < #{tmpfile}` File.delete(tmpfile) -- cgit v1.2.3