[Koha-bugs] [Bug 10589] Override OpacHiddenItems based on Patron Branch

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Mar 6 11:53:27 CET 2019


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

Tomás Cohen Arazi <tomascohen at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tomascohen at gmail.com

--- Comment #47 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Please take a look at bug 22454 and bug 22455. The rationale is that if you
have the biblio object, you can know all that is needed regarding hiding in
OPAC without fetching MARC data or complex calculations. And if we were to add
parameters like category and library, I would rather pass the Koha::Patron
object altogether.
This check, with bug 22457 in mind could be written:

my $should_hide = ( $patron->category->overrides_opac_hidding_policy or
                    $patron->library->overrides_opac_hidding_policy )
                ? 0
                : 1;

while ( my $biblio = $biblios->next ) {
 next if $biblio->hidden_in_opac and $should_hide;
 do_your_things();
}

This check should be written on the controller script.

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


More information about the Koha-bugs mailing list