diff options
| author | ivan <ivan> | 2004-03-11 02:05:38 +0000 |
|---|---|---|
| committer | ivan <ivan> | 2004-03-11 02:05:38 +0000 |
| commit | eb9668a6f3181ee02cb335272c5ee4616e61fd09 (patch) | |
| tree | f5a22d9141723fd9e2fdb40430e4a38743b72604 /rt/lib/RT/URI | |
| parent | 25953817e61fd252c18241699c0b6cdc3fa54121 (diff) | |
| parent | 289340780927b5bac2c7604d7317c3063c6dd8cc (diff) | |
This commit was generated by cvs2svn to compensate for changes in r3241,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'rt/lib/RT/URI')
| -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; } } |
