From b6dc739a53630894503ddc162af46d4880b47e4b Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 24 Apr 2019 11:04:47 -0400 Subject: [PATCH] Bug 20256: (QA follow-up) Remove double negative from code Signed-off-by: Bob Bennhoff - CLiC --- Koha/Patron.pm | 2 +- catalogue/detail.pl | 2 +- cataloguing/additem.pl | 1 - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 32f880ea6e..8b5bd632a3 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -1292,7 +1292,7 @@ sub can_see_patrons_from { =head3 libraries_where_can_see_patrons -my $libraries = $patron-libraries_where_can_see_patrons; +my $libraries = $patron->libraries_where_can_see_patrons; Return the list of branchcodes(!) of libraries the patron is allowed to see other patron's infos. The branchcodes are arbitrarily returned sorted. diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 85131dd1e1..3dd6675930 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -387,7 +387,7 @@ foreach my $item (@items) { $item->{'course_reserves'} = GetItemCourseReservesInfo( itemnumber => $item->{'itemnumber'} ); } - $item->{cannot_be_edited} = !$patron->can_edit_item( $item_object ); + $item->{can_be_edited} = !$patron->can_edit_item( $item_object ); if ($currentbranch and C4::Context->preference('SeparateHoldings')) { if ($itembranchcode and $itembranchcode eq $currentbranch) { diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 531abd24ad..15cea6cc8f 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -830,7 +830,6 @@ foreach my $field (@fields) { { #verifying rights unless ( $patron->can_edit_item($subfieldvalue) ) { - warn "NOMOD"; $this_row{'nomod'} = 1; } } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index fa90a88cf1..1905ed0b44 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -261,7 +261,7 @@ [% IF (StaffDetailItemSelection) %] - [% UNLESS item.cannot_be_edited %] + [% IF item.can_be_edited %] [% END %] -- 2.24.1 (Apple Git-126)