diff options
author | Jesse Vincent <jesse@bestpractical.com> | 2003-01-20 23:11:21 +0300 |
---|---|---|
committer | Jesse Vincent <jesse@bestpractical.com> | 2003-01-20 23:11:21 +0300 |
commit | 3f5b52e511574fb2d350b94957c8b1566fcb473b (patch) | |
tree | 5fc26b43799a14af0304cff4550964e610661d2a | |
parent | 9e153f2e72eb064a041408c7bb808aeef269ee48 (diff) |
UTF-8 fixes for web display; changes to support RT2->RT3 importer (optional cache disabling)rt-2.1.60
-rwxr-xr-x | etc/initialdata | 8 | ||||
-rwxr-xr-x | html/Elements/Error | 3 | ||||
-rwxr-xr-x | html/Elements/Login | 2 | ||||
-rwxr-xr-x | html/SelfService/Attachment/dhandler | 2 | ||||
-rwxr-xr-x | html/autohandler | 3 | ||||
-rwxr-xr-x | lib/RT/Interface/Web.pm | 14 | ||||
-rwxr-xr-x | lib/RT/Record.pm | 10 | ||||
-rwxr-xr-x | lib/RT/URI.pm | 2 |
8 files changed, 17 insertions, 27 deletions
diff --git a/etc/initialdata b/etc/initialdata index 1050ff8280..25f2d4d6a4 100755 --- a/etc/initialdata +++ b/etc/initialdata @@ -66,7 +66,7 @@ @ScripActions = ( - { Name => 'AutoreplyToRequestors', # loc + { Name => 'Autoreply To Requestors', # loc Description => 'Always sends a message to the requestors independent of message sender' , # loc @@ -246,7 +246,7 @@ Transaction: {$Transaction->Description} { Queue => '0', - Name => 'AdminCorrespondence', # loc + Name => 'Admin Correspondence', # loc Description => 'Default admin correspondence template', # loc Content => ' @@ -265,7 +265,7 @@ Transaction: {$Transaction->Description} }, { Queue => '0', - Name => 'AdminComment', # loc + Name => 'Admin Comment', # loc Description => 'Default admin comment template', # loc Content => 'Subject: [Comment] {my $s=($Transaction->Subject||$Ticket->Subject); $s =~ s/\\[Comment\\]//g; $comment =~ s/^Re//i; $s;} @@ -279,7 +279,7 @@ This is a comment. It is not sent to the Requestor(s): }, { Queue => '0', - Name => 'StatusChange', # loc + Name => 'Status Change', # loc Description => 'Ticket status changed', # loc Content => 'Subject: Status Changed to: {$Transaction->NewValue} diff --git a/html/Elements/Error b/html/Elements/Error index 6dba22de57..bc40e0bc27 100755 --- a/html/Elements/Error +++ b/html/Elements/Error @@ -59,7 +59,4 @@ if ( $session{'SessionType'} eq 'REST' ) { $m->out( $Details . "\n" ); $m->abort(); } -else { - $r->content_type('text/html'); -} </%INIT> diff --git a/html/Elements/Login b/html/Elements/Login index d0290a7221..d46ed7c2d9 100755 --- a/html/Elements/Login +++ b/html/Elements/Login @@ -99,8 +99,6 @@ if ($session{'SessionType'} eq 'REST') { $m->out(loc("Not logged in")); } $m->abort(); -} else { - $r->content_type('text/html'); } diff --git a/html/SelfService/Attachment/dhandler b/html/SelfService/Attachment/dhandler index d88714d960..d62b01d5da 100755 --- a/html/SelfService/Attachment/dhandler +++ b/html/SelfService/Attachment/dhandler @@ -44,7 +44,7 @@ } my $content_type = $AttachmentObj->ContentType || 'text/plain'; - SetContentType($content_type); + $r->content_type($content_type); $m->out($AttachmentObj->Content); $m->abort; </%perl> diff --git a/html/autohandler b/html/autohandler index 9ca53aa62a..24fea47341 100755 --- a/html/autohandler +++ b/html/autohandler @@ -52,8 +52,7 @@ unless ($session{'CurrentUser'} && $session{'CurrentUser'}->Id) { } # Set the proper encoding for the current language handle -SetContentType("text/html; charset=".$session{'CurrentUser'}->LanguageHandle->encoding); -#$RT::Logger->debug("Language encoding is ". $session{'CurrentUser'}->LanguageHandle->encoding); +$r->content_type("text/html; charset=utf-8"); #if it's a noauth file, don't ask for auth. if ( ($m->base_comp->path =~ '^(/+)NoAuth/') diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm index db371f2310..9ce4597fd1 100755 --- a/lib/RT/Interface/Web.pm +++ b/lib/RT/Interface/Web.pm @@ -129,20 +129,6 @@ package HTML::Mason::Commands; use strict; use vars qw/$r $m %session/; -# {{{ SetContentType - -=head2 SetContentType TYPE - -Set this response's output to content type TYPE - -=cut - -sub SetContentType { - my $type = shift; - $r->content_type($type); -} - -# }}} # {{{ loc diff --git a/lib/RT/Record.pm b/lib/RT/Record.pm index f37dd1860f..4a3edf0f90 100755 --- a/lib/RT/Record.pm +++ b/lib/RT/Record.pm @@ -51,7 +51,15 @@ use DBIx::SearchBuilder::Record::Cachable; use strict; use vars qw/@ISA/; -@ISA = qw(DBIx::SearchBuilder::Record::Cachable RT::Base); + +@ISA = qw(RT::Base); + +if ($RT::DontCacheSearchBuilderRecords ) { + push (@ISA, 'DBIx::SearchBuilder::Record'); +} else { + push (@ISA, 'DBIx::SearchBuilder::Record::Cachable'); + +} # {{{ sub _Init diff --git a/lib/RT/URI.pm b/lib/RT/URI.pm index dd907bbd11..c0375a02bf 100755 --- a/lib/RT/URI.pm +++ b/lib/RT/URI.pm @@ -101,6 +101,8 @@ sub FromURI { my $self = shift; my $uri = shift; + return undef unless ($uri); + my $scheme; # Special case: integers passed in as URIs must be ticket ids if ($uri =~ /^(\d+)$/) { |