projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
483a2e4
)
generate a stack backtrace for mystery freeside link resolution problems
author
ivan
<ivan>
Thu, 25 Mar 2010 21:22:29 +0000
(21:22 +0000)
committer
ivan
<ivan>
Thu, 25 Mar 2010 21:22:29 +0000
(21:22 +0000)
rt/lib/RT/URI/freeside.pm
patch
|
blob
|
history
diff --git
a/rt/lib/RT/URI/freeside.pm
b/rt/lib/RT/URI/freeside.pm
index
57c2a2c
..
6194fd0
100644
(file)
--- 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;
# END LICENSE BLOCK
package RT::URI::freeside;
-use
RT::URI::base
;
+use
base qw( RT::URI::base )
;
use strict;
use strict;
-use vars qw(
@ISA $IntegrationType $URL
);
-
@ISA = qw/RT::URI::base/
;
+use vars qw(
$IntegrationType $URL
);
+
use Carp qw( cluck )
;
=head1 NAME
=head1 NAME
@@
-196,10
+196,18
@@
sub ParseURI {
my ($table, $pkey);
my $uriprefix = $self->_FreesideURIPrefix;
my ($table, $pkey);
my $uriprefix = $self->_FreesideURIPrefix;
- if ($uri =~ /^$uriprefix\/(\w+)\/(\d+)$/) {
+ if ($uri =~ /^$uriprefix\/(\w+)\/(\d*)$/) {
+
$table = $1;
$pkey = $2;
$table = $1;
$pkey = $2;
+
+ unless ( $pkey ) {
+ cluck "bad URL $uri";
+ return(undef);
+ }
+
$self->{'scheme'} = $self->Scheme;
$self->{'scheme'} = $self->Scheme;
+
} else {
return(undef);
}
} else {
return(undef);
}