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

Tomás Cohen Arazi <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #3 from Tomás Cohen Arazi <[email protected]> ---
Hi, I felt tempted to rewrite all those conditionals on adding this feature. I
didn't do it because I didn't intend to change other behaviors.
One of those is the fact this page has some custom handling of the record not
found use case. I don't think it is THAT important, but with your patch, that
part of the template becomes unreachable, and thus requires a cleanup.

That said, I'd suggest you make the condition be checked as an else of the
previous one:

```perl
    if ($biblio) {
        if ( !$biblio->can_be_edited($logged_in_patron) ) {
            print $input->redirect("/cgi-bin/koha/errors/403.pl");    # escape
early
            exit;
    } else {
        $biblionumber = undef;
        $template->param( bib_doesnt_exist => 1 );
    }
```

Otherwise you will be returning 403 when the record doesn't exist, which should
be a 404 and has specific code for handling it.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://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/

Reply via email to