diff options
author | jeff <jeff> | 2007-07-18 18:07:38 +0000 |
---|---|---|
committer | jeff <jeff> | 2007-07-18 18:07:38 +0000 |
commit | cc0c6be1aa795f85d05f15a3e8568fcef2bbd380 (patch) | |
tree | ec860b85f11d59ccedfce77cf9d82fbf40eb9107 /httemplate/config/config-download.cgi | |
parent | 53d68b31e5ec07704c53829548c537bac03b8894 (diff) |
config in database cleanup, editing, and agent-specific config (452, 1419)
Diffstat (limited to 'httemplate/config/config-download.cgi')
-rw-r--r-- | httemplate/config/config-download.cgi | 18 |
1 files changed, 14 insertions, 4 deletions
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; +} + </%init> |