From bb499be3d4e992832d361ee15f8c5033b6af07fd 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 --- 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 14a964f386..156bdee8f4 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -1148,7 +1148,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 318f464a07..e7f80d1c9b 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -340,7 +340,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 $currentbranch ne "NO_LIBRARY_SET" and C4::Context->preference('SeparateHoldings')) { diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index c70d028c42..c1ad7314ba 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -809,7 +809,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 3e54622098..cdea5493ce 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -222,7 +222,7 @@ [% IF (StaffDetailItemSelection) %] - [% UNLESS item.cannot_be_edited %] + [% IF item.can_be_edited %] [% END %] -- 2.11.0