From 31234c192a4a180c779eadd5d24e277ea228d286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Tue, 8 Apr 2014 17:26:18 +0200 Subject: [PATCH] Bug 12048 - Doesn't display other libraries subscriptions when superlibrarian user This is a regression in master and 3.14. When a user has superlibrian permissions, a search on serials subscriptions must display other libraries subscriptions even when IndependantBranch syspref is enabled. To reproduce/test the bug/patch: 1. Enable IndependanBranch 2. Login as a user not having superlibrarian permission 3. Search for a serial subscription on: /cgi-bin/koha/serials/serials-search.pl 4. Search a title which has at least 2 subscriptions: one in the user branch, and one in another branch 5. On the result page, just 1 subscription is displayed: the one attached to the userbranch => this is normal 6. Login as a user having superlibrarian permission 7. Repeat step 3-5. 8. You get the same result as 5. You should have seen all subscriptions. That's what you get after applying this patch. --- C4/Serials.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Serials.pm b/C4/Serials.pm index 6c035d5..40ed6f2 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -741,6 +741,7 @@ sub SearchSubscriptions { $subscription->{cannotdisplay} = ( C4::Context->preference("IndependentBranches") && C4::Context->userenv && + C4::Context->userenv->{flags} % 2 && $subscription->{branchcode} ne C4::Context->userenv->{'branch'} ) ? 1 : 0; } -- 1.7.10.4