diff options
Diffstat (limited to 'httemplate/misc/phonenums.cgi')
| -rw-r--r-- | httemplate/misc/phonenums.cgi | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/httemplate/misc/phonenums.cgi b/httemplate/misc/phonenums.cgi index fd5de2ae6..a048280bb 100644 --- a/httemplate/misc/phonenums.cgi +++ b/httemplate/misc/phonenums.cgi @@ -1,4 +1,4 @@ -<% objToJson(\@phonenums) %> +<% encode_json(\@phonenums) %>\ <%init> my( $exchangestring, $svcpart ) = $cgi->param('arg'); @@ -21,13 +21,13 @@ if ( $exchangestring ) { my %opts = (); if ( $exchangestring eq 'tollfree' ) { $opts{'tollfree'} = 1; - } - #elsif ( $exchangestring =~ /^([\w\s\:\,\(\)\-]+), ([A-Z][A-Z])$/ ) { - elsif ( $exchangestring =~ /^(.+), ([A-Z][A-Z])$/ ) { + } elsif ( $exchangestring =~ /^_REGION (.*)$/ ) { + $opts{'region'} = $1; + #} elsif ( $exchangestring =~ /^([\w\s\:\,\(\)\-]+), ([A-Z][A-Z])$/ ) { + } elsif ( $exchangestring =~ /^(.+), ([A-Z][A-Z])$/ ) { $opts{'ratecenter'} = $1; $opts{'state'} = $2; - } - else { + } else { $exchangestring =~ /\((\d{3})-(\d{3})-XXXX\)\s*$/i or die "unparsable exchange: $exchangestring"; my( $areacode, $exchange ) = ( $1, $2 ); |
