diff options
author | ivan <ivan> | 2008-06-28 23:03:10 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-06-28 23:03:10 +0000 |
commit | 9c7dee35f91a386fcce14cb6c3e9d23ba3eee8af (patch) | |
tree | b21b3ca250947289caaecdeba659bc37257bf464 /httemplate/misc/exchanges.cgi | |
parent | a1871d3d13c1dafa93b956762c0d23728d261da7 (diff) |
get DIDs from globalpops
Diffstat (limited to 'httemplate/misc/exchanges.cgi')
-rw-r--r-- | httemplate/misc/exchanges.cgi | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/httemplate/misc/exchanges.cgi b/httemplate/misc/exchanges.cgi new file mode 100644 index 000000000..f5860cff2 --- /dev/null +++ b/httemplate/misc/exchanges.cgi @@ -0,0 +1,24 @@ +%# [ <% join(', ', map { qq("$_") } @exchanges) %> ] +<% objToJson(\@exchanges) %> +<%init> + +my( $areacode, $svcpart ) = $cgi->param('arg'); + +my $part_svc = qsearchs('part_svc', { 'svcpart'=>$svcpart } ); +die "unknown svcpart $svcpart" unless $part_svc; + +my @exports = $part_svc->part_export_did; +if ( scalar(@exports) > 1 ) { + die "more than one DID-providing export attached to svcpart $svcpart"; +} elsif ( ! @exports ) { + die "no DID providing export attached to svcpart $svcpart"; +} +my $export = $exports[0]; + +my $something = $export->get_dids('areacode'=>$areacode); + +#warn Dumper($something); + +my @exchanges = @{ $something }; + +</%init> |