View | Details | Raw Unified | Return to bug 22068
Collapse All | Expand All

(-)a/opac/opac-article-request-cancel.pl (-3 / +7 lines)
Lines 39-47 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
39
39
40
my $id = $query->param('id');
40
my $id = $query->param('id');
41
41
42
if ( $id && $borrowernumber ) {
42
if ( $id ) {
43
    my $ar = Koha::ArticleRequests->find( $id );
43
    my $ar = Koha::ArticleRequests->find( $id );
44
    $ar->cancel() if $ar;
44
    if ( !$ar || $ar->borrowernumber != $borrowernumber ) {
45
        print $query->redirect("/cgi-bin/koha/errors/404.pl");
46
        exit;
47
    }
48
49
    $ar->cancel();
45
}
50
}
46
51
47
print $query->redirect("/cgi-bin/koha/opac-user.pl#opac-user-article-requests");
52
print $query->redirect("/cgi-bin/koha/opac-user.pl#opac-user-article-requests");
48
- 

Return to bug 22068