From 7adffd6e8918e0820e7ab97b77b9f6e49cba4ac3 Mon Sep 17 00:00:00 2001 From: tonnesen Date: Wed, 11 Jun 2003 18:34:43 +0000 Subject: [PATCH] Using boolean_preference() instead of preference() for 'marc' system pref. --- loadmodules.pl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/loadmodules.pl b/loadmodules.pl index 59e873109f..1d50ebdea8 100755 --- a/loadmodules.pl +++ b/loadmodules.pl @@ -39,15 +39,14 @@ sub acquisitions { my $aq_type = $input->param('acquisitions'); $aq_type = C4::Context->preference("acquisitions") || "normal" unless $aq_type; my $marc_bool =$input->param('MARC'); - $marc_bool = C4::Context->preference("MARC") ||"OFF" unless $marc_bool; - + $marc_bool = C4::Context->boolean_preference('marc') || 0 unless $marc_bool; # Get the acquisition preference. This should be: # "simple" - minimal information required # "normal" - full information required # other - Same as "normal" if ($aq_type eq 'simple') { - if ($marc_bool eq "ON") { + if ($marc_bool eq "1") { print $input->redirect("/cgi-bin/koha/acqui.simple/addbooks.pl"); } else { print $input->redirect("/cgi-bin/koha/acqui.simple/addbiblio-nomarc.pl"); @@ -58,8 +57,8 @@ sub acquisitions { } sub addbiblio { - my $marc_bool = C4::Context->preference("MARC") ||"OFF"; - if ($marc_bool eq "ON") { + my $marc_bool = C4::Context->boolean_preference("MARC") || 0; + if ($marc_bool eq "1") { print $input->redirect("/cgi-bin/koha/acqui.simple/addbooks.pl"); } else { print $input->redirect("/cgi-bin/koha/acqui.simple/addbiblio-nomarc.pl"); -- 2.39.5