From fff0c3eb879e5ad98c70c6ed5f61bcab52308bba 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 e9fcde00c6..e23b9f0492 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -1352,7 +1352,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 a9ff8c4315..bb5b4f09cf 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -399,7 +399,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 ( C4::Context->preference("LocalCoverImages") == 1 ) { $item->{cover_images} = $item_object->cover_images; diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 7868b12712..23e4f61d30 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -870,7 +870,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 024c121b5b..57c46ccd47 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -325,7 +325,7 @@ [% IF (StaffDetailItemSelection) %] - [% UNLESS item.cannot_be_edited %] + [% IF item.can_be_edited %] [% END %] -- 2.24.1 (Apple Git-126)