[Koha-bugs] [Bug 28360] Link to make article reqests should display on detail page when user is not logged in

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 4 00:31:16 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28360

--- Comment #1 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
I just retested this in 20.11:

ArticleRequestsLinkControl = Always show

- Result list: Article request link always shows
- Detail page: Article request link only shows when logged in

I think this is because of the check on the artreqpossible template variable -
I suspect it can only be 1 if the user is logged in:

    my $artreqpossible = $patron
        ? $biblio->can_article_request( $patron )
        : $itemtype
        ? $itemtype->may_article_request
        : q{};
    $template->param( artreqpossible => $artreqpossible );

The code for the same variable in the result list is certainly different, but
completely mysterious to me:

# BZ17530: 'Intelligent' guess if result can be article requested
$res->{artreqpossible} = ( $art_req_itypes->{ $res->{itemtype} // q{} } ||
$art_req_itypes->{ '*' } ) ? 1 : q{};

I am not sure how to fix this :(

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list