Using boolean_preference() instead of preference() for 'marc' system pref.
This commit is contained in:
parent
82744c0ca9
commit
7adffd6e89
1 changed files with 4 additions and 5 deletions
|
@ -39,15 +39,14 @@ sub acquisitions {
|
||||||
my $aq_type = $input->param('acquisitions');
|
my $aq_type = $input->param('acquisitions');
|
||||||
$aq_type = C4::Context->preference("acquisitions") || "normal" unless $aq_type;
|
$aq_type = C4::Context->preference("acquisitions") || "normal" unless $aq_type;
|
||||||
my $marc_bool =$input->param('MARC');
|
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:
|
# Get the acquisition preference. This should be:
|
||||||
# "simple" - minimal information required
|
# "simple" - minimal information required
|
||||||
# "normal" - full information required
|
# "normal" - full information required
|
||||||
# other - Same as "normal"
|
# other - Same as "normal"
|
||||||
|
|
||||||
if ($aq_type eq 'simple') {
|
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");
|
print $input->redirect("/cgi-bin/koha/acqui.simple/addbooks.pl");
|
||||||
} else {
|
} else {
|
||||||
print $input->redirect("/cgi-bin/koha/acqui.simple/addbiblio-nomarc.pl");
|
print $input->redirect("/cgi-bin/koha/acqui.simple/addbiblio-nomarc.pl");
|
||||||
|
@ -58,8 +57,8 @@ sub acquisitions {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub addbiblio {
|
sub addbiblio {
|
||||||
my $marc_bool = C4::Context->preference("MARC") ||"OFF";
|
my $marc_bool = C4::Context->boolean_preference("MARC") || 0;
|
||||||
if ($marc_bool eq "ON") {
|
if ($marc_bool eq "1") {
|
||||||
print $input->redirect("/cgi-bin/koha/acqui.simple/addbooks.pl");
|
print $input->redirect("/cgi-bin/koha/acqui.simple/addbooks.pl");
|
||||||
} else {
|
} else {
|
||||||
print $input->redirect("/cgi-bin/koha/acqui.simple/addbiblio-nomarc.pl");
|
print $input->redirect("/cgi-bin/koha/acqui.simple/addbiblio-nomarc.pl");
|
||||||
|
|
Loading…
Reference in a new issue