From acabdc87c9a883e36def78dcff6fccb4980d35ab Mon Sep 17 00:00:00 2001
From: Jonathan Druart
Date: Tue, 16 Aug 2016 13:56:19 +0100
Subject: [PATCH] Bug 9569: AutoLocation should not depend on
IndependentBranches
Those 2 prefs can be independent and it does not make sense to consider
AutoLocation only if IndependentBranches is set.
Signed-off-by: Chris Cormack
Signed-off-by: Nick Clemens
Signed-off-by: Kyle M Hall
---
C4/Auth.pm | 2 +-
.../intranet-tmpl/prog/en/modules/auth.tt | 22 +++++++++----------
.../prog/en/modules/circ/circulation-home.tt | 2 +-
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/C4/Auth.pm b/C4/Auth.pm
index f82a0629e1..9b3e89390f 100644
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -1051,7 +1051,7 @@ sub checkauth {
$branchname = $library? $library->branchname: '';
}
my $branches = { map { $_->branchcode => $_->unblessed } Koha::Libraries->search };
- if ( C4::Context->boolean_preference('IndependentBranches') && C4::Context->boolean_preference('Autolocation') ) {
+ if ( C4::Context->boolean_preference('AutoLocation') ) {
# we have to check they are coming from the right ip range
my $domain = $branches->{$branchcode}->{'branchip'};
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt
index 82743dddfe..79b5d15db7 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt
@@ -54,17 +54,17 @@
-[% IF ( AutoLocation ) %][% ELSE %]
-[% IF ( IndependentBranches ) %][% ELSE %]
-
-
-
[% END %]
- [% END %]
+[% UNLESS IndependentBranches %]
+
+
+
+
+[% END %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt
index 48f4f8d43b..e2a129cf92 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt
@@ -24,7 +24,7 @@
[% IF ( display_transfer ) %]