diff options
| author | ivan <ivan> | 2011-04-10 18:04:12 +0000 |
|---|---|---|
| committer | ivan <ivan> | 2011-04-10 18:04:12 +0000 |
| commit | ae9fe834eabeb6e0bf3d39b5f5ee1eb22203b345 (patch) | |
| tree | a9cf6b1265ad91810f2aa07558744309b244b7ae /httemplate/search | |
| parent | 8a76ec0177f2622ef393eba89f65c123a796502f (diff) | |
fix CDR links on svc_phone when using a default_prefix, RT#12338
Diffstat (limited to 'httemplate/search')
| -rw-r--r-- | httemplate/search/cdr.html | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/httemplate/search/cdr.html b/httemplate/search/cdr.html index 6ee544e0e..bf59ff625 100644 --- a/httemplate/search/cdr.html +++ b/httemplate/search/cdr.html @@ -168,10 +168,15 @@ if ( $cgi->param('src') =~ $phonenum ) { push @search, "src = '$src'"; } -if ( $cgi->param('dst') =~ $phonenum ) { - ( my $dst = $1 ) =~ s/$x//g; - $hashref->{'dst'} = $dst; - push @search, "dst = '$dst'"; +if ( $cgi->param('dst') ) { + + my @d = map { $_, "1$_" } split(/\s*,\s*/, $cgi->param('dst') ); + + my $search = 'dst IN ('. join(',', map dbh->quote($_), @d). ')'; + + push @search, $search; + push @qsearch, $search; + } if ( $cgi->param('dcontext') =~ /^\s*(.+)\s*$/ ) { |
