Bugzilla – Attachment 31011 Details for
Bug 7673
New patron permissions to manage items (edit, batchmod, delete all)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7673: QA Followup: trailing whitespace and perlcritic issues
Bug-7673-QA-Followup-trailing-whitespace-and-perlc.patch (text/plain), 3.19 KB, created by
Jonathan Druart
on 2014-08-20 10:45:44 UTC
(
hide
)
Description:
Bug 7673: QA Followup: trailing whitespace and perlcritic issues
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-08-20 10:45:44 UTC
Size:
3.19 KB
patch
obsolete
>From 13fb336ab9aadbfb4a6e8a7cbffda70940d38ffc Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 3 Dec 2013 15:09:01 +0100 >Subject: [PATCH] Bug 7673: QA Followup: trailing whitespace and perlcritic > issues > >This patch fixes the following qa issues: > > FAIL cataloguing/additem.pl > FAIL forbidden patterns > forbidden pattern: trailing space char (line 833) > FAIL critic > # Variables::ProhibitConditionalDeclarations: Got 2 violation(s). > > FAIL tools/batchMod.pl > FAIL critic > # Variables::ProhibitConditionalDeclarations: Got 2 violation(s). > >Signed-off-by: Koha Team AMU <koha.aixmarseille@gmail.com> >--- > cataloguing/additem.pl | 8 ++++---- > tools/batchMod.pl | 4 ++-- > 2 files changed, 6 insertions(+), 6 deletions(-) > >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index 7105753..5f35077 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -369,8 +369,8 @@ my ($template, $loggedinuser, $cookie) > > > # Does the user have a limited item edition permission? >-my $uid = GetMember( borrowernumber => $loggedinuser )->{userid} if ($loggedinuser) ; >-my $limitededition = haspermission($uid, {'editcatalogue' => 'limited_item_edition'}) if ($uid); >+my $uid = $loggedinuser ? GetMember( borrowernumber => $loggedinuser )->{userid} : undef; >+my $limitededition = $uid ? haspermission($uid, {'editcatalogue' => 'limited_item_edition'}) : undef; > # In case user is a superlibrarian, edition is not limited > $limitededition = 0 if ($limitededition != 0 && $limitededition->{'superlibrarian'} eq 1); > >@@ -830,10 +830,10 @@ foreach my $tag ( keys %{$tagslib}){ > my @values = (undef); > @values = $itemrecord->field($tag)->subfield($subtag) if ($itemrecord && defined($itemrecord->field($tag)) && defined($itemrecord->field($tag)->subfield($subtag))); > for my $value (@values){ >- my $subfield_data = generate_subfield_form($tag, $subtag, $value, $tagslib, $tagslib->{$tag}->{$subtag}, $branches, $today_iso, $biblionumber, $temp, \@loop_data, $i, $limitededition); >+ my $subfield_data = generate_subfield_form($tag, $subtag, $value, $tagslib, $tagslib->{$tag}->{$subtag}, $branches, $today_iso, $biblionumber, $temp, \@loop_data, $i, $limitededition); > push (@loop_data, $subfield_data); > $i++; >- } >+ } > } > } > @loop_data = sort {$a->{subfield} cmp $b->{subfield} } @loop_data; >diff --git a/tools/batchMod.pl b/tools/batchMod.pl >index ca10f61..d0648e4 100755 >--- a/tools/batchMod.pl >+++ b/tools/batchMod.pl >@@ -71,8 +71,8 @@ my ($template, $loggedinuser, $cookie) > }); > > # Does the user have a limited item edition permission? >-my $uid = GetMember( borrowernumber => $loggedinuser )->{userid} if ($loggedinuser) ; >-my $limitededition = haspermission($uid, {'tools' => 'items_limited_batchmod'}) if ($uid); >+my $uid = $loggedinuser ? GetMember( borrowernumber => $loggedinuser )->{userid} : undef; >+my $limitededition = $uid ? haspermission($uid, {'tools' => 'items_limited_batchmod'}) : undef; > # In case user is a superlibrarian, edition is not limited > $limitededition = 0 if ($limitededition != 0 && $limitededition->{'superlibrarian'} eq 1); > >-- >2.0.0.rc2
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 7673
:
8714
|
9857
|
10360
|
12102
|
13004
|
16225
|
16239
|
16368
|
16371
|
23266
|
23267
|
23270
|
23271
|
26008
|
26009
|
26704
|
26705
|
26722
|
27631
|
27632
|
27633
|
27634
|
27635
|
27636
|
27637
|
27638
|
27640
|
27641
|
28007
|
28008
|
28009
|
28010
|
28011
|
28012
|
28013
|
28014
|
28015
|
29550
|
30910
|
30911
|
30912
|
30913
|
30914
|
30915
|
30916
|
30917
|
30918
|
30919
|
31010
|
31011
|
31012
|
31013
|
31015
|
31016
|
31017
|
31019
|
32200
|
32201
|
32215
|
32217
|
32219
|
32220
|
32222
|
32224
|
32225
|
32226
|
32227
|
32228
|
32928
|
32962
|
32993
|
33487