diff options
author | ivan <ivan> | 2010-03-25 21:22:29 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-03-25 21:22:29 +0000 |
commit | 83b11db106c2a035675d6b5e47f1b7ec91395acb (patch) | |
tree | 5229ad9db650283aea93324d9a84f8fd51d65447 /rt/lib | |
parent | 483a2e4dad0f7ce8dbdc06a825d1aa11bd742f6b (diff) |
generate a stack backtrace for mystery freeside link resolution problems
Diffstat (limited to 'rt/lib')
-rw-r--r-- | rt/lib/RT/URI/freeside.pm | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/rt/lib/RT/URI/freeside.pm b/rt/lib/RT/URI/freeside.pm index 57c2a2c4e..6194fd0cb 100644 --- a/rt/lib/RT/URI/freeside.pm +++ b/rt/lib/RT/URI/freeside.pm @@ -26,10 +26,10 @@ # END LICENSE BLOCK package RT::URI::freeside; -use RT::URI::base; +use base qw( RT::URI::base ); use strict; -use vars qw(@ISA $IntegrationType $URL); -@ISA = qw/RT::URI::base/; +use vars qw( $IntegrationType $URL ); +use Carp qw( cluck ); =head1 NAME @@ -196,10 +196,18 @@ sub ParseURI { my ($table, $pkey); my $uriprefix = $self->_FreesideURIPrefix; - if ($uri =~ /^$uriprefix\/(\w+)\/(\d+)$/) { + if ($uri =~ /^$uriprefix\/(\w+)\/(\d*)$/) { + $table = $1; $pkey = $2; + + unless ( $pkey ) { + cluck "bad URL $uri"; + return(undef); + } + $self->{'scheme'} = $self->Scheme; + } else { return(undef); } |