diff options
author | ivan <ivan> | 2004-03-11 02:05:38 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-03-11 02:05:38 +0000 |
commit | 289340780927b5bac2c7604d7317c3063c6dd8cc (patch) | |
tree | c4100ab9857ae00c330213af8a46e66c208580e6 /rt/lib/RT/URI/fsck_com_rt.pm | |
parent | 945721f48f74d5cfffef7c7cf3a3d6bc2521f5dd (diff) |
import of rt 3.0.9RT_3_0_9
Diffstat (limited to 'rt/lib/RT/URI/fsck_com_rt.pm')
-rw-r--r-- | rt/lib/RT/URI/fsck_com_rt.pm | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/rt/lib/RT/URI/fsck_com_rt.pm b/rt/lib/RT/URI/fsck_com_rt.pm index 36e8f82fd..4035776ef 100644 --- a/rt/lib/RT/URI/fsck_com_rt.pm +++ b/rt/lib/RT/URI/fsck_com_rt.pm @@ -133,7 +133,7 @@ sub ParseURI { if ( $self->IsLocal) { my $local_uri_prefix = $self->LocalURIPrefix; - if ($self->{'uri'} =~ /^$local_uri_prefix(\d+)$/) { + if ($self->{'uri'} =~ /^$local_uri_prefix(\d+)$/i) { my $id = $1; @@ -170,7 +170,7 @@ Returns undef otherwise. sub IsLocal { my $self = shift; my $local_uri_prefix = $self->LocalURIPrefix; - if ($self->{'uri'} =~ /^$local_uri_prefix/) { + if ($self->{'uri'} =~ /^$local_uri_prefix/i) { return 1; } else { @@ -214,7 +214,7 @@ Otherwise, return its URI sub HREF { my $self = shift; - if ($self->IsLocal) { + if ($self->IsLocal && $self->Object) { return ( $RT::WebURL . "Ticket/Display.html?id=".$self->Object->Id); } else { @@ -230,12 +230,11 @@ Returns either a localized string 'ticket #23' or the full URI if the object is sub AsString { my $self = shift; - if ($self->IsLocal) { - return $self->loc("ticket #[_1]", $self->Object->Id); - + if ($self->IsLocal && $self->Object) { + return $self->loc("ticket #[_1]", $self->Object->Id); } else { - return $self->Object->URI; + return $self->URI; } } |