Bugzilla – Attachment 37717 Details for
Bug 13917
OPAC: Placing holds still possible by URL even if turned off by system preference
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13917: OPAC: Putting holds still possible by URL even if turned off by system preference
Bug-13917-OPAC-Putting-holds-still-possible-by-URL.patch (text/plain), 1.52 KB, created by
Jonathan Druart
on 2015-04-13 09:50:57 UTC
(
hide
)
Description:
Bug 13917: OPAC: Putting holds still possible by URL even if turned off by system preference
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-04-13 09:50:57 UTC
Size:
1.52 KB
patch
obsolete
>From 226de59078873b706543f8945366536815bee307 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Thu, 26 Mar 2015 15:04:07 +0100 >Subject: [PATCH] Bug 13917: OPAC: Putting holds still possible by URL even if > turned off by system preference > >To test: > >1) >Prepare an URL that put's a hold in OPAC (see comment #1), e.g. >[YOUR SERVER]/cgi-bin/koha/opac-reserve.pl?biblionumbers=1 > >2) >Set system preference 'RequestOnOpac' to 'Don't allow patrons to place holds on items from the OPAC.' > >3) >Go diectly to this URL. >Result: The page displays to confirm hold (wrong) > >4) >Apply patch > >5) >Repeat step 3 >Result: Redirect to 404 page (OK) > >6) >Set system preference to "Allow" > >7) >Repeat step 3 >Result: The page displays to confirm hold (OK), like it would be from link in OPAC. > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > opac/opac-reserve.pl | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index c30ee08..ed4033d 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -42,6 +42,13 @@ use Date::Calc qw/Today Date_to_Days/; > my $maxreserves = C4::Context->preference("maxreserves"); > > my $query = new CGI; >+ >+# if RequestOnOpac (for placing holds) is disabled, leave immediately >+if ( ! C4::Context->preference('RequestOnOpac') ) { >+ print $query->redirect("/cgi-bin/koha/errors/404.pl"); >+ exit; >+} >+ > my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > { > template_name => "opac-reserve.tt", >-- >2.1.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13917
:
37274
|
37717
|
37917