X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Flib%2FRT%2FURI%2Ffsck_com_rt.pm;h=4035776efcf48cbf2e73642e6bf74647a78ef5fb;hp=36e8f82fdd19e43960544db4a1a04cc5f2e34b95;hb=289340780927b5bac2c7604d7317c3063c6dd8cc;hpb=945721f48f74d5cfffef7c7cf3a3d6bc2521f5dd 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; } }