Bugzilla – Attachment 193513 Details for
Bug 41894
Bareword "C4::Context::only_my_library" not allowed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41894: Remove error 'Bareword C4::Context::only_my_library not allowed'
8a302a0.patch (text/plain), 1.46 KB, created by
Jonathan Druart
on 2026-02-20 10:25:56 UTC
(
hide
)
Description:
Bug 41894: Remove error 'Bareword C4::Context::only_my_library not allowed'
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2026-02-20 10:25:56 UTC
Size:
1.46 KB
patch
obsolete
>From 8a302a0f98a7568db387480f49a9dab3ca6126a0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 20 Feb 2026 11:22:20 +0100 >Subject: [PATCH] Bug 41894: Remove error 'Bareword > C4::Context::only_my_library not allowed' > >--- > Koha/Libraries.pm | 2 +- > Koha/Patron.pm | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Koha/Libraries.pm b/Koha/Libraries.pm >index 5594decc9f2..aaaae9daeab 100644 >--- a/Koha/Libraries.pm >+++ b/Koha/Libraries.pm >@@ -54,7 +54,7 @@ sub search_filtered { > my @branchcodes = $logged_in_user->libraries_where_can_see_patrons; > $params->{branchcode} = { -in => \@branchcodes } if @branchcodes; > } else { >- if (C4::Context::only_my_library) { >+ if ( C4::Context->only_my_library ) { > $params->{branchcode} = C4::Context->userenv->{branch}; > } > } >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index c0ef6e292c5..f6b2474f20b 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -2351,7 +2351,7 @@ sub libraries_where_can_see_things { > return () unless $userenv; # For tests, but userenv should be defined in tests... > > my @restricted_branchcodes; >- if (C4::Context::only_my_library) { >+ if ( C4::Context->only_my_library ) { > push @restricted_branchcodes, $self->branchcode; > } else { > unless ( $self->has_permission( { $permission => $subpermission } ) ) { >-- >2.43.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41894
: 193513