Bugzilla – Attachment 62112 Details for
Bug 14932
serials/serials-collection.pl-page is very slow. GetFullSubscription* checks permission for each serial!
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14932: Do not call can_edit_subscription with an empty value
Bug-14932-Do-not-call-caneditsubscription-with-an-.patch (text/plain), 1.63 KB, created by
Jonathan Druart
on 2017-04-12 17:23:53 UTC
(
hide
)
Description:
Bug 14932: Do not call can_edit_subscription with an empty value
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-04-12 17:23:53 UTC
Size:
1.63 KB
patch
obsolete
>From f2b4f6eb2e689d2980aa1601dd261cb9c2feba95 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 11 Apr 2017 10:31:49 -0300 >Subject: [PATCH] Bug 14932: Do not call can_edit_subscription with an empty > value > >ref($sub) eq 'ARRAY' should always be true, what we want is to call >can_edit_subscription if there is at least 1 serial for this >subscription. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/Serials.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 040fe61..c1316f2 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -343,7 +343,7 @@ sub GetFullSubscription { > my $sth = $dbh->prepare($query); > $sth->execute($subscriptionid); > my $subscriptions = $sth->fetchall_arrayref( {} ); >- my $cannotedit = not can_edit_subscription( $subscriptions->[0] ) if ref($subscriptions) eq 'ARRAY'; >+ my $cannotedit = not can_edit_subscription( $subscriptions->[0] ) if scalar @$subscriptions; > for my $subscription ( @$subscriptions ) { > $subscription->{cannotedit} = $cannotedit; > } >@@ -503,7 +503,7 @@ sub GetFullSubscriptionsFromBiblionumber { > my $sth = $dbh->prepare($query); > $sth->execute($biblionumber); > my $subscriptions = $sth->fetchall_arrayref( {} ); >- my $cannotedit = not can_edit_subscription( $subscriptions->[0] ) if ref($subscriptions) eq 'ARRAY'; >+ my $cannotedit = not can_edit_subscription( $subscriptions->[0] ) if scalar @$subscriptions; > for my $subscription ( @$subscriptions ) { > $subscription->{cannotedit} = $cannotedit; > } >-- >2.9.3
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 14932
:
43007
|
61974
|
62111
| 62112