From: Jonathan Druart Date: Tue, 16 Aug 2016 12:56:19 +0000 (+0100) Subject: Bug 9569: AutoLocation should not depend on IndependentBranches X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=acabdc87c9a883e36def78dcff6fccb4980d35ab;p=koha.git 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 --- 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 ) %]
  • Transfer
  • [% END %] - [% IF ( AutoLocation ) %][% ELSE %][% IF ( IndependentBranches ) %][% ELSE %]
  • Set library
  • [% END %][% END %] + [% UNLESS IndependentBranches %]
  • Set library
  • [% END %] [% IF ( fast_cataloging ) %] [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
  • Fast cataloging