From a9274186b9ef2c119369317a106f5577b05c1146 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 4 Jan 2016 09:23:15 +0000 Subject: [PATCH] Bug 12528: redirect to 404 if at least 1 pref is off MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc Véron Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- opac/opac-messaging.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opac/opac-messaging.pl b/opac/opac-messaging.pl index 1a07f13cb4..6a97ca6de5 100755 --- a/opac/opac-messaging.pl +++ b/opac/opac-messaging.pl @@ -35,6 +35,12 @@ use Koha::SMS::Providers; my $query = CGI->new(); +unless ( C4::Context->preference('EnhancedMessagingPreferencesOPAC') and + C4::Context->preference('EnhancedMessagingPreferences') ) { + print $query->redirect("/cgi-bin/koha/errors/404.pl"); + exit; +} + my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { template_name => 'opac-messaging.tt', -- 2.39.5