From: senator Date: Mon, 14 Mar 2011 21:31:05 +0000 (-0400) Subject: CGIUTF8 was a horrible, subtle, dark failure X-Git-Url: http://git.equinoxoli.org/?p=evergreen-equinox.git;a=commitdiff_plain;h=4213b223849b7b4144d6658863b87adec77af135 CGIUTF8 was a horrible, subtle, dark failure and I don't want to talk about it. Also, 'use CGI qw/-utf8/' suddenly works. Maybe it always did. --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/CGIUTF8.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/CGIUTF8.pm deleted file mode 100644 index baa43eb..0000000 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/CGIUTF8.pm +++ /dev/null @@ -1,20 +0,0 @@ -package OpenILS::WWW::CGIUTF8; -use strict; -use warnings; -use base qw(CGI); -use Encode; - -sub param { - my ($self, $k) = @_; - - return map { Encode::decode_utf8($_) } CGI::param($k) if wantarray; - return Encode::decode_utf8(CGI::param($k)); -} - -sub param_bin { - my $self = shift; - - return CGI::param(@_); -} - -1; diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm index 941efa1..178f4d8 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm @@ -13,7 +13,7 @@ use OpenILS::Application::AppUtils; use OpenILS::Utils::CStoreEditor qw/:funcs/; use OpenILS::Utils::Fieldmapper; use DateTime::Format::ISO8601; -use OpenILS::WWW::CGIUTF8; +use CGI qw(-utf8); # EGCatLoader sub-modules use OpenILS::WWW::EGCatLoader::Util; @@ -33,7 +33,11 @@ sub new { $self->apache($apache); $self->ctx($ctx); - $self->cgi(new OpenILS::WWW::CGIUTF8); + $self->cgi(new CGI); + + my $msg1 = "LFW XXX: param('query') is " . $self->cgi->param('query'); + $logger->info("LFW XXX: msg1 is " . $msg1); + $logger->info("LFW XXX: query_string is " . $self->cgi->query_string()); OpenILS::Utils::CStoreEditor->init; # just in case $self->editor(new_editor()); diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/CGIUTF8.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/CGIUTF8.pm deleted file mode 100644 index e90d5d9..0000000 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb/CGIUTF8.pm +++ /dev/null @@ -1,17 +0,0 @@ -package OpenILS::WWW::EGWeb::CGIUTF8; - -# This is just a wrapper for TT around the real package, -# which is OpenILS::WWW::CGIUTF8 - -use strict; -use warnings; -use base 'Template::Plugin'; -use OpenILS::WWW::CGIUTF8; - -sub new { - my $class = shift; - my $context = shift; - new OpenILS::WWW::CGIUTF8(@_); -} - -1; diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2 index ca33722..29a938f 100644 --- a/Open-ILS/web/templates/default/opac/parts/header.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/header.tt2 @@ -1,6 +1,6 @@ [%- USE money = format(l('$%.2f')); USE date; - USE CGI = CGIUTF8; + USE CGI; USE EGI18N; SET DATE_FORMAT = l('%m/%d/%Y');