X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=FS%2FFS%2Fpart_export%2Fhttp_status.pm;h=6fbd3fbe663feb3422945128cc49d489c8334002;hb=1ad547a47f16b4230762e752fbe48d460ed997e1;hp=2d1523123d91cb401da402e17239bb8cd3799dc5;hpb=f67f6e8b97eb9d9e732fa6bb1524bd904643c83f;p=freeside.git diff --git a/FS/FS/part_export/http_status.pm b/FS/FS/part_export/http_status.pm index 2d1523123..6fbd3fbe6 100644 --- a/FS/FS/part_export/http_status.pm +++ b/FS/FS/part_export/http_status.pm @@ -17,6 +17,7 @@ tie my %options, 'Tie::IxHash', 'svc' => 'svc_dsl', 'desc' => 'Retrieve status information via HTTP or HTTPS', 'options' => \%options, + 'no_machine' => 1, 'notes' => <<'END' Fields from the service can be substituted in the URL as $field. END @@ -27,12 +28,17 @@ sub rebless { shift; } sub export_getstatus { my( $self, $svc_x, $htmlref, $hashref ) = @_; - my $url = $self->option('url'); + my $url; + my $urlopt = $self->option('url'); + no strict 'vars'; { no strict 'refs'; ${$_} = $svc_x->getfield($_) foreach $svc_x->fields; + if ( $svc_x->table eq 'svc_dsl' ) { + ${$_} = $svc_x->$_() foreach (qw( gateway_access_or_phonenum )); + } - $url = eval(qq($url)); + $url = eval(qq("$urlopt")); } my $req = HTTP::Request::Common::GET( $url );