From af47bfc4a05a675e2b7a47c79c029ee4bdf75ac4 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 13 Feb 2024 12:36:44 +0000 Subject: [PATCH] Bug 36072: opac-request-article should check syspref MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Note: This is handled now just like opac-reserve. Test plan: Disable ArticleRequests and hit the page. Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize (cherry picked from commit 8afcbe0bbb556cb19ff2e33e56cf3bcb8dd13d11) Signed-off-by: Fridolin Somers (cherry picked from commit c4d348651192eaed83d13df4f7d166b977690e6d) Signed-off-by: Frédéric Demians --- opac/opac-request-article.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opac/opac-request-article.pl b/opac/opac-request-article.pl index dcf9f214a5..3fdb402118 100755 --- a/opac/opac-request-article.pl +++ b/opac/opac-request-article.pl @@ -33,6 +33,12 @@ use Try::Tiny; my $cgi = CGI->new; +# If ArticleRequests is disabled, leave immediately +if ( !C4::Context->preference('ArticleRequests') ) { + print $cgi->redirect("/cgi-bin/koha/errors/404.pl"); + exit; +} + my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { template_name => "opac-request-article.tt", -- 2.39.5