From 01c317d7b0b1d8e173defeaaa507f34b53cef24d Mon Sep 17 00:00:00 2001 From: tipaul Date: Thu, 13 Feb 2003 18:03:36 +0000 Subject: [PATCH] script now used only when currencies rates modified in acqui/acqui-home.pl page => removed unused code --- currency.pl | 53 ++++++++--------------------------------------------- 1 file changed, 8 insertions(+), 45 deletions(-) diff --git a/currency.pl b/currency.pl index 78aa974982..8431453fb2 100755 --- a/currency.pl +++ b/currency.pl @@ -24,55 +24,18 @@ # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -# FIXME - There's an "admin/currency.pl", and this script never seems -# to be used. Is it obsolete? - use CGI; use C4::Catalogue; use C4::Biblio; my $input=new CGI; -my $type=$input->param('type'); -#find out what the script is being called for -#print $input->header(); -if ($type ne 'change'){ - #display, we must fetch the exchange rate data and output it - print $input->header(); - print < -
- - - EXCHANGE RATES - - -printend -; - my ($count,$rates)=getcurrencies(); - for (my $i=0;$i<$count;$i++){ - if ($rates->[$i]->{'currency'} ne 'NZD'){ - print "$rates->[$i]->{'currency'}[$i]->{'currency'}\" value=$rates->[$i]->{'rate'}>"; - } -# print $rates->[$i]->{'currency'}; - } - print < - - - - - -printend -; -} else { -# print $input->Dump; - my @params=$input->param; - foreach my $param (@params){ - if ($param ne 'type' && $param !~ /submit/){ - my $data=$input->param($param); - updatecurrencies($param,$data); - } - } - print $input->redirect('/acquisitions/'); +my @params=$input->param; +foreach my $param (@params){ + if ($param ne 'type' && $param !~ /submit/){ + my $data=$input->param($param); + warn "$data / $param"; + updatecurrencies($param,$data); +} } +print $input->redirect('/cgi-bin/koha/acqui/acqui-home.pl'); -- 2.39.5