\n%{errormessage}\nSincerely,\n") % {:errormessage => errormessage, :urlofsite => $conf.siteurl}
subject = _("Bug in Dudle")
$d << _("An error occurred 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:")
$d << <
#{errorheadstr}
#{CGI.escapeHTML(errorstr)}
ERROR
end
$d.out
known = false
if (errorstr)
$conf.known_errors.each{|err|
known = true if errorstr.index(err)
}
end
if $conf.auto_send_report && !known
tmpfile = "/tmp/error.#{rand(10000)}"
File.open(tmpfile,"w"){|f|
f << errorstr
}
%x{mail -s "Bug in Dudle" #{$conf.bugreportmail} < #{tmpfile}}
File.delete(tmpfile)
end