X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fconfig%2Fconfig-image.cgi;h=0e04ab5bc78ea6f70567efacc5df5d6f12c90544;hp=892f7c65beb45157db83e4ec969030ba77493a92;hb=b71b1576c68bc40ad26592b354feace37a029f0e;hpb=a4b8ce8cd1d309de00c64f38049a8dda38798046 diff --git a/httemplate/config/config-image.cgi b/httemplate/config/config-image.cgi index 892f7c65b..0e04ab5bc 100644 --- a/httemplate/config/config-image.cgi +++ b/httemplate/config/config-image.cgi @@ -1,11 +1,9 @@ -<% $conf->config_binary($name, $agentnum) %> +<% $logo %> <%init> die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); -my $conf = new FS::Conf; - http_header( 'Content-Type' => 'image/png' ); #just png for now $cgi->param('key') =~ /^([-\w.]+)$/ or die "illegal config option"; @@ -16,4 +14,14 @@ if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) { $agentnum = $1; } +my $locale = ''; +if ( $cgi->param('locale') =~ /^(\w+)$/ ) { + $locale = $1; +} + +my $conf = new FS::Conf { 'locale' => $locale }; + +my $logo = $conf->config_binary($name, $agentnum); +$logo = eps2png($logo) if $name =~ /\.eps$/i; +