Bugzilla – Attachment 43649 Details for
Bug 8436
Add branch limit on checkexpiration.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8436: QA Follow-up: Activate branch filter, if IndependentBranches is off
Bug-8436-QA-Follow-up-Activate-branch-filter-if-In.patch (text/plain), 1.90 KB, created by
Katrin Fischer
on 2015-10-20 15:04:59 UTC
(
hide
)
Description:
Bug 8436: QA Follow-up: Activate branch filter, if IndependentBranches is off
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2015-10-20 15:04:59 UTC
Size:
1.90 KB
patch
obsolete
>From 3527525cd98ca3fbcdfc72c10003d57eac9dde7f Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Tue, 20 Oct 2015 16:36:06 +0200 >Subject: [PATCH] Bug 8436: QA Follow-up: Activate branch filter, if > IndependentBranches is off > >The superserials permission is only in use in combination with >IndependentBranches - so it makes sense to also show the branch >filter when IndependentBranches is off. > >Permission description: > superserials Manage subscriptions from any branch > (only applies when IndependentBranches is used) > >Also adds a missing check for superlibraian. > >Note: the duplicated permission check in the code is not really nice >- would be good to rewrite this to be more clean. >--- > serials/checkexpiration.pl | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/serials/checkexpiration.pl b/serials/checkexpiration.pl >index bb0715a..62cac74 100755 >--- a/serials/checkexpiration.pl >+++ b/serials/checkexpiration.pl >@@ -81,7 +81,9 @@ if ($date) { > $subscription->{expirationdate} = $expirationdate; > next if $expirationdate !~ /\d{4}-\d{2}-\d{2}/; # next if not in ISO format. > next if $subscription->{closed}; >- if ( ( ref $flags->{serials} and $flags->{serials}->{superserials} ) >+ if ( !C4::Context->preference("IndependentBranches") >+ or C4::Context->IsSuperLibrarian() >+ or ( ref $flags->{serials} and $flags->{serials}->{superserials} ) > or ( !ref $flags->{serials} and $flags->{serials} == 1 ) ) > { > $subscription->{cannotedit} = 0; >@@ -107,7 +109,8 @@ if ($date) { > > my $branchname; > my $branches_loop; >-if ( C4::Context->IsSuperLibrarian() >+if ( !C4::Context->preference("IndependentBranches") >+ or C4::Context->IsSuperLibrarian() > or ( ref $flags->{serials} and $flags->{serials}->{superserials} ) > or ( !ref $flags->{serials} and $flags->{serials} == 1 ) ) > { >-- >1.9.1
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 8436
:
11742
|
11746
|
19262
|
35166
|
36062
|
41891
|
43646
|
43647
|
43648
|
43649
|
43650
|
43750
|
43751