[Rt-commit] rt branch, spreadsheet-improvements, updated. rt-3.8.8-252-gc1f6e68

Chia-liang Kao clkao at bestpractical.com
Thu Aug 12 11:48:42 EDT 2010


The branch, spreadsheet-improvements has been updated
       via  c1f6e68e87b0c1890fd5b39a5377d29f241adfe0 (commit)
       via  5e5ef03f8a62a98ba61c64fbdd64ab43aacf86e0 (commit)
      from  d0c0ca931233dfb524ed33061ffa40c2b1b71747 (commit)

Summary of changes:
 lib/RT/Interface/Web/Request.pm |   14 ++++++++------
 share/html/Search/Results.tsv   |    4 ++--
 2 files changed, 10 insertions(+), 8 deletions(-)

- Log -----------------------------------------------------------------
commit 5e5ef03f8a62a98ba61c64fbdd64ab43aacf86e0
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Thu Aug 12 23:45:56 2010 +0800

    psgi mason handler

diff --git a/lib/RT/Interface/Web/Request.pm b/lib/RT/Interface/Web/Request.pm
index 35da16d..b258c19 100644
--- a/lib/RT/Interface/Web/Request.pm
+++ b/lib/RT/Interface/Web/Request.pm
@@ -53,18 +53,20 @@ use warnings;
 
 our $VERSION = '0.30';
 use base qw(HTML::Mason::Request);
+use Params::Validate qw(:all);
 
 sub new {
     my $class = shift;
 
-    my $new_class = $HTML::Mason::ApacheHandler::VERSION ?
-        'HTML::Mason::Request::ApacheHandler' :
-            $HTML::Mason::CGIHandler::VERSION ?
-                'HTML::Mason::Request::CGI' :
-                    'HTML::Mason::Request';
+    my $new_class =
+         $HTML::Mason::ApacheHandler::VERSION ? 'HTML::Mason::Request::ApacheHandler' :
+         $HTML::Mason::PSGIHandler::VERSION   ? 'HTML::Mason::Request::PSGI' :
+         $HTML::Mason::CGIHandler::VERSION    ? 'HTML::Mason::Request::CGI' :
+                                                'HTML::Mason::Request';
 
+warn "=> alter to $new_class";
     $class->alter_superclass( $new_class );
-    $class->valid_params( %{ $new_class->valid_params } );
+    $class->valid_params( %{ $new_class->valid_params },cgi_request => { type => OBJECT, optional => 1 } );
     return $class->SUPER::new(@_);
 }
 

commit c1f6e68e87b0c1890fd5b39a5377d29f241adfe0
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Thu Aug 12 23:50:14 2010 +0800

    encode_utf8

diff --git a/share/html/Search/Results.tsv b/share/html/Search/Results.tsv
index 0346293..6b86784 100644
--- a/share/html/Search/Results.tsv
+++ b/share/html/Search/Results.tsv
@@ -67,7 +67,7 @@ my $should_loc = { map { $_ => 1 } qw(Status) };
 my $col_entry = sub {
     my $col = shift;
     return {
-        header => loc($col->{title} || $col->{attribute}),
+        header => Encode::encode_utf8(loc($col->{title} || $col->{attribute})),
         map    => $m->comp(
             "/Elements/ColumnMap",
             Name  => $col->{attribute},
@@ -124,7 +124,7 @@ while (my $row = $Tickets->Next) {
             # remove tabs from all field values, they screw up the tsv
             $val = '' unless defined $val;
             $val =~ s/(?:\n|\r)//g; $val =~ s{\t}{    }g;
-            $val;
+            Encode::encode_utf8($val);
         } @$col)."\n");
     }
 }

-----------------------------------------------------------------------


More information about the Rt-commit mailing list