X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fconfig%2Fconfig-download.cgi;h=6979246dbc5c0d65dee58a7acf633e904bd8f742;hb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;hp=95a172a516ea0d4563c5beb20604f8daab750fe0;hpb=27216c115fc2a2f8b76abc91be9bba599c6516fc;p=freeside.git diff --git a/httemplate/config/config-download.cgi b/httemplate/config/config-download.cgi index 95a172a51..6979246db 100644 --- a/httemplate/config/config-download.cgi +++ b/httemplate/config/config-download.cgi @@ -5,14 +5,24 @@ %http_header('Content-Type' => 'application/x-unknown' ); % %die "No configuration variable specified (bad URL)!" # umm -% unless $cgi->keywords; -%my($query) = $cgi->keywords; -%$query =~ /^([\w -\)+-\/@;:?=[\]]+)$/; +% unless $cgi->param('key'); +%$cgi->param('key') =~ /^([-\w.]+)$/; %my $name = $1; % +%my $agentnum; +%if ($cgi->param('agentnum') =~ /^(\d+)$/) { +% $agentnum = $1; +%} +% %http_header('Content-Disposition' => "attachment; filename=$name" ); -% print $conf->config_binary($name); +% print $conf->config_binary($name, $agentnum); <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); + +my $agentnum; +if ($cgi->param('agentnum') =~ /^(\d+)$/) { + $agentnum = $1; +} +