From a426a6ca80e633fbf5e548ec78979d9d35e9dcfb Mon Sep 17 00:00:00 2001 From: Benjamin Kellermann Date: Mon, 27 Sep 2010 00:00:16 +0200 Subject: error pages have unified look --- error.cgi | 35 +++++------------------------------ 1 file changed, 5 insertions(+), 30 deletions(-) (limited to 'error.cgi') diff --git a/error.cgi b/error.cgi index dabac02..d6ee9c3 100755 --- a/error.cgi +++ b/error.cgi @@ -19,32 +19,8 @@ # along with dudle. If not, see . # ############################################################################ -require "cgi" -$cgi = CGI.new -require 'gettext' -require 'gettext/cgi' -include GetText -GetText.cgi=$cgi -GetText.output_charset = 'utf-8' -require "locale" - -GetText.bindtextdomain("dudle",:path => "./locale/") - -require "config" - -require "html" - -title = _("Error") -$h = HTML.new(title) -$h.add_css("/#{DEFAULT_CSS}","default",true) -$h << < -
-
-
-
-

#{title}

-END +require "dudle" +$d = Dudle.new(:title => _("Error"), :hide_lang_chooser => true) def urlescape(str) CGI.escapeHTML(CGI.escape(str).gsub("+","%20")) @@ -69,19 +45,18 @@ 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} subject = _("Bug in dudle") - $h << _("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 => "#{BUGREPORTMAIL}"} if (errorstr) errorheadstr = _("Please include the following as well:") - $h << < #{errorheadstr}
#{CGI.escapeHTML(errorstr)}
ERROR end -$h << "
" -$h.out($cgi) +$d.out if AUTO_SEND_REPORT -- cgit v1.2.3