Bug 15131: Make SCO use the new syspref.
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 11 Jul 2016 15:57:29 +0000 (12:57 -0300)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 21 Oct 2016 17:27:07 +0000 (17:27 +0000)
This patch just makes SCO use the new syspref (AllowItemsOnHoldCheckoutSCO)
instead of the old one, thus making it configurable, separate from the
non-SCO syspref.

Sponsored-by: NEKLS
Signed-off-by: George <george@nekls.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
opac/sco/sco-main.pl

index 0a59d3b..6d2eb57 100755 (executable)
@@ -31,8 +31,7 @@
 #
 # FIXME: inputfocus not really used in TMPL
 
-use strict;
-use warnings;
+use Modern::Perl;
 
 use CGI qw ( -utf8 );
 use Digest::MD5 qw(md5_base64);
@@ -143,7 +142,7 @@ elsif ( $op eq "checkout" ) {
             $barcode,
             undef,
             0,
-            C4::Context->preference("AllowItemsOnHoldCheckout")
+            C4::Context->preference("AllowItemsOnHoldCheckoutSCO")
         );
     }
     $confirm_required = scalar keys %$needconfirm;
@@ -232,7 +231,7 @@ if ($borrower->{cardnumber}) {
             $it->{'barcode'},
             undef,
             0,
-            C4::Context->preference("AllowItemsOnHoldCheckout")
+            C4::Context->preference("AllowItemsOnHoldCheckoutSCO")
         );
         $it->{'norenew'} = 1 if $renewokay->{'NO_MORE_RENEWALS'};
         $it->{date_due}  = $it->{date_due_sql};