https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20256
--- Comment #28 from Josef Moravec <[email protected]> --- Comment on attachment 88546 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88546 Bug 20256: Use new methods Review of attachment 88546: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=20256&attachment=88546) ----------------------------------------------------------------- ::: C4/Items.pm @@ +1746,4 @@ > $status = "book_on_loan"; > } > elsif ( defined C4::Context->userenv > + and !Koha::Patrons->find( C4::Context->userenv->{number} > )->can_edit_item( $item ) ) What if patron does not exist? This subroutine is called by misc/cronjobs/delete_items.pl ::: catalogue/detail.pl @@ +340,4 @@ > $item->{'course_reserves'} = GetItemCourseReservesInfo( itemnumber > => $item->{'itemnumber'} ); > } > > + $item->{cannot_be_edited} = !$patron->can_edit_item( $item_object ); Why do you use negative and then again negative (UNLESS) in template? ::: cataloguing/additem.pl @@ +810,3 @@ > #verifying rights > + unless ( $patron->can_edit_item($subfieldvalue) ) { > + warn "NOMOD"; debug message, should be removed ::: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ +223,5 @@ > [% IF (StaffDetailItemSelection) %] > <td style="text-align:center;vertical-align:middle"> > + [% UNLESS item.cannot_be_edited %] > + <input type="checkbox" value="[% item.itemnumber > | html %]" name="itemnumber" /> > + [% END %] This could be [% IF item.can_be_edited %] See my previous comment on detail.pl -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
