[Koha-bugs] [Bug 35151] Convert ILLModuleCopyrightClearance system preference to additional contents

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Nov 3 16:55:05 CET 2023


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

--- Comment #1 from Owen Leonard <oleonard at myacpl.org> ---
This bug is trickier than other similar ones because we don't just show the
ILLModuleCopyrightClearance message or not based on whether it is present.

Instead, there is an additional step to the OPAC ILL request process if
ILLModuleCopyrightClearance is present. This is easy to do with a system
preference, but I don't think there are any instances of Koha checking for the
existence of an html customization at the perl module level.

I brought up this issue on IRC:

https://irc.koha-community.org/koha/2023-10-26#i_2517477

There's not a consensus that this is the way to go, but this is what I got
working in Illrequest.pm:

sub backend_create {
    my ( $self, $params ) = @_;

    # Establish whether we need to do a generic copyright clearance.
    if ( $params->{opac} ) {

        my $copyright_content = Koha::AdditionalContents->search_for_display(
            {
                category   => 'html_customizations',
                location   => ['ILLModuleCopyrightClearance'],
                lang       => $params->{lang},
                library_id => $params->{branchcode},
            }
        );

        if ( ( !$params->{stage} || $params->{stage} eq 'init' )
            && $copyright_content->count )
        {
...

Is this a terrible idea?

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


More information about the Koha-bugs mailing list