From 1c723253630c78743480f1f1d8d7bc92e8003df8 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 Signed-off-by: Martin Renvoize --- 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 fb0d13db5f..5061d7b5ae 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -1365,7 +1365,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 7c0619a4dd..2de66f96a8 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -378,7 +378,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 d7de83e6e6..be17810b5e 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -860,7 +860,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 e75d9abe21..4ccb27ff51 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -345,7 +345,7 @@ [% IF (StaffDetailItemSelection) %] - [% UNLESS item.cannot_be_edited %] + [% IF item.can_be_edited %] [% END %] -- 2.20.1