From 29c30f06861e9f85521297ae27d12bd8acfc2442 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 a541fd6fd3..75c95ca104 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -1274,7 +1274,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 79402ff7b0..663ff4dd52 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -373,7 +373,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 eac929b77b..952435fb92 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -825,7 +825,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 0faacbd204..9817194728 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -258,7 +258,7 @@ [% IF (StaffDetailItemSelection) %] - [% UNLESS item.cannot_be_edited %] + [% IF item.can_be_edited %] [% END %] -- 2.24.1 (Apple Git-126)