summaryrefslogtreecommitdiff
path: root/httemplate/config/config-process.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/config/config-process.cgi')
-rw-r--r--httemplate/config/config-process.cgi12
1 files changed, 10 insertions, 2 deletions
diff --git a/httemplate/config/config-process.cgi b/httemplate/config/config-process.cgi
index d8f0d8e93..3e49b4f99 100644
--- a/httemplate/config/config-process.cgi
+++ b/httemplate/config/config-process.cgi
@@ -1,5 +1,4 @@
<%init>
-
die "access denied\n"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
@@ -28,6 +27,16 @@ foreach my $i ( @config_items ) {
} else {
$conf->delete($i->key);
}
+ } elsif ( $type eq 'binary' ) {
+ if ( defined($cgi->param($i->key. $n)) && $cgi->param($i->key. $n) ) {
+ my $fh = $cgi->upload($i->key. $n);
+ if (defined($fh)) {
+ local $/;
+ $conf->set_binary($i->key, <$fh>);
+ }
+ }else{
+ warn "Condition failed for " . $i->key;
+ }
} elsif ( $type eq 'checkbox' ) {
# if ( defined($cgi->param($i->key. $n)) && $cgi->param($i->key. $n) ) {
if ( defined $cgi->param($i->key. $n) ) {
@@ -57,6 +66,5 @@ foreach my $i ( @config_items ) {
$conf->touch($_) foreach @touch;
$conf->delete($_) foreach @delete;
}
-
</%init>
<% $cgi->redirect("config-view.cgi") %>