Parcelforce: Skip queries that start with ISBN.

Also added a check if `$parcel_number` exists in the first place.
master
jagtalon 2014-07-09 13:55:21 +00:00
parent 9c61d96fa7
commit ef7a86d7d0
1 changed files with 7 additions and 0 deletions

View File

@ -34,6 +34,13 @@ triggers query_nowhitespace_nodash => qr/
handle query_nowhitespace_nodash => sub {
my $parcel_number = $+{parcel_number};
# Exit if $parcel_number doesn't exist.
return unless $parcel_number;
# Exit if $parcel_number starts with ISBN.
return if $parcel_number =~ /^isbn/i;
return $parcel_number,
heading => 'Parcelforce Tracking',
html =>