diff --git a/C4/Auth.pm b/C4/Auth.pm
index 77917a871b..ea766c1a04 100644
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -480,7 +480,7 @@ sub get_template_and_user {
advancedMARCEditor => C4::Context->preference("advancedMARCEditor"),
AllowMultipleCovers => C4::Context->preference('AllowMultipleCovers'),
AmazonCoverImages => C4::Context->preference("AmazonCoverImages"),
- StaffLoginRestrictBranchByIP => C4::Context->preference("StaffLoginRestrictBranchByIP"),
+ StaffLoginRestrictLibraryByIP => C4::Context->preference("StaffLoginRestrictLibraryByIP"),
can_see_cataloguing_module => haspermission( $user, get_cataloguing_page_permissions() ) ? 1 : 0,
canreservefromotherbranches => C4::Context->preference('canreservefromotherbranches'),
EasyAnalyticalRecords => C4::Context->preference('EasyAnalyticalRecords'),
@@ -1196,7 +1196,7 @@ sub checkauth {
}
if ( $type ne 'opac' ) {
my $branches = { map { $_->branchcode => $_->unblessed } Koha::Libraries->search->as_list };
- if ( C4::Context->preference('StaffLoginRestrictBranchByIP') ) {
+ if ( C4::Context->preference('StaffLoginRestrictLibraryByIP') ) {
# we have to check they are coming from the right ip range
my $domain = $branches->{$branchcode}->{'branchip'};
$domain =~ s|\.\*||g;
@@ -1218,12 +1218,12 @@ sub checkauth {
# If StaffLoginBranchBasedOnIP is enabled we will try to find a branch
# matching your ip, regardless of the choice you have passed in
(
- !C4::Context->preference('StaffLoginRestrictBranchByIP')
+ !C4::Context->preference('StaffLoginRestrictLibraryByIP')
&& C4::Context->preference('StaffLoginBranchBasedOnIP')
)
- # When StaffLoginRestrictBranchByIP is enabled we will not choose a branch matching IP
+ # When StaffLoginRestrictLibraryByIP is enabled we will not choose a branch matching IP
# if your selected branch has no IP set
- || ( C4::Context->preference('StaffLoginRestrictBranchByIP')
+ || ( C4::Context->preference('StaffLoginRestrictLibraryByIP')
&& $auth_state ne 'failed'
&& $branches->{$branchcode}->{'branchip'} )
)
@@ -1410,7 +1410,7 @@ sub checkauth {
IntranetUserCSS => C4::Context->preference("IntranetUserCSS"),
IntranetUserJS => C4::Context->preference("IntranetUserJS"),
IndependentBranches => C4::Context->preference("IndependentBranches"),
- StaffLoginRestrictBranchByIP => C4::Context->preference("StaffLoginRestrictBranchByIP"),
+ StaffLoginRestrictLibraryByIP => C4::Context->preference("StaffLoginRestrictLibraryByIP"),
wrongip => $info{'wrongip'},
PatronSelfRegistration => C4::Context->preference("PatronSelfRegistration"),
PatronSelfRegistrationDefaultCategory => C4::Context->preference("PatronSelfRegistrationDefaultCategory"),
diff --git a/C4/UsageStats.pm b/C4/UsageStats.pm
index f45a3d4a85..fe3b092da2 100644
--- a/C4/UsageStats.pm
+++ b/C4/UsageStats.pm
@@ -146,7 +146,7 @@ sub _shared_preferences {
noItemTypeImages
OpacNoItemTypeImages
virtualshelves
- StaffLoginRestrictBranchByIP
+ StaffLoginRestrictLibraryByIP
IndependentBranches
SessionStorage
Persona
diff --git a/installer/data/mysql/atomicupdate/bug_26176.pl b/installer/data/mysql/atomicupdate/bug_26176.pl
index fb675cfe38..784c569351 100755
--- a/installer/data/mysql/atomicupdate/bug_26176.pl
+++ b/installer/data/mysql/atomicupdate/bug_26176.pl
@@ -3,16 +3,18 @@ use Koha::Installer::Output qw(say_warning say_failure say_success say_info);
return {
bug_number => "26176",
- description => "Rename AutoLocation to StaffLoginRestrictBranchByIP",
+ description => "Rename AutoLocation to StaffLoginRestrictLibraryByIP",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
- $dbh->do(q{
- UPDATE systempreferences SET variable = "StaffLoginRestrictBranchByIP"
+ $dbh->do(
+ q{
+ UPDATE systempreferences SET variable = "StaffLoginRestrictLibraryByIP"
WHERE variable = "AutoLocation"
- });
+ }
+ );
- say $out "Renamed system preference 'AutoLocation' to 'StaffLoginRestrictBranchByIP'";
+ say $out "Renamed system preference 'AutoLocation' to 'StaffLoginRestrictLibraryByIP'";
},
};
diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql
index fded76e277..eb8862d273 100644
--- a/installer/data/mysql/mandatory/sysprefs.sql
+++ b/installer/data/mysql/mandatory/sysprefs.sql
@@ -724,7 +724,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('StaffLangSelectorMode','footer','top|both|footer','Select the location to display the language selector in staff interface','Choice'),
('StaffLoginInstructions', '', NULL, 'HTML to go into the login box for the staff interface','Free'),
('StaffLoginBranchBasedOnIP', '1','', 'Set the logged in library for the user based on their current IP','YesNo'),
-('StaffLoginRestrictBranchByIP','0',NULL,'If ON, IP authentication is enabled, blocking access to the staff interface from unauthorized IP addresses based on branch','YesNo'),
+('StaffLoginRestrictLibraryByIP','0',NULL,'If ON, IP authentication is enabled, blocking access to the staff interface from unauthorized IP addresses based on branch','YesNo'),
('StaffSearchResultsDisplayBranch','holdingbranch','holdingbranch|homebranch','Controls the display of the home or holding branch for staff search results','Choice'),
('StaffSerialIssueDisplayCount','3','','Number of serial issues to display per subscription in the staff interface','Integer'),
('staffShibOnly','0','','If ON enables shibboleth only authentication for the staff client','YesNo'),
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc
index 06ed5fb431..1fe069d0b7 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc
@@ -94,7 +94,7 @@
[% SET is_superlibrarian = CAN_user_superlibrarian ? 'is_superlibrarian' : '' %]
[% logged_in_user.userid | html %]
[% logged_in_user.categorycode | html %]
- [% IF ( StaffLoginRestrictBranchByIP ) %]
+ [% IF ( StaffLoginRestrictLibraryByIP ) %]