Bugzilla – Attachment 38124 Details for
Bug 9254
New option to block patrons from changing messaging preferences in OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9254: redirect to 404 if at least 1 pref is off
Bug-9254-redirect-to-404-if-at-least-1-pref-is-off.patch (text/plain), 2.03 KB, created by
Mark Tompsett
on 2015-04-18 21:39:09 UTC
(
hide
)
Description:
Bug 9254: redirect to 404 if at least 1 pref is off
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2015-04-18 21:39:09 UTC
Size:
2.03 KB
patch
obsolete
>From 4164ab7b1035edc419a197b494a8ae6180c53712 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Sat, 18 Apr 2015 17:36:27 -0400 >Subject: [PATCH] Bug 9254: redirect to 404 if at least 1 pref is off > >And set the default value of EnhancedMessagingPreferencesOPAC = EnhancedMessagingPreferences >--- > ...Add-OPACEnhancedMessagingPreferences-system-preference.sql | 11 ++++++----- > opac/opac-messaging.pl | 6 ++++++ > 2 files changed, 12 insertions(+), 5 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/Bug-9254-Add-OPACEnhancedMessagingPreferences-system-preference.sql b/installer/data/mysql/atomicupdate/Bug-9254-Add-OPACEnhancedMessagingPreferences-system-preference.sql >index 85adb7d..35f01bf 100644 >--- a/installer/data/mysql/atomicupdate/Bug-9254-Add-OPACEnhancedMessagingPreferences-system-preference.sql >+++ b/installer/data/mysql/atomicupdate/Bug-9254-Add-OPACEnhancedMessagingPreferences-system-preference.sql >@@ -1,6 +1,7 @@ > INSERT INTO systempreferences >- (variable,value,explanation,options,type) >-VALUES >- ('EnhancedMessagingPreferencesOPAC',1, >- 'Show the patrons messaging preferences page in the OPAC', >- NULL, 'YesNo'); >+ (variable,value,explanation,options,type) >+SELECT 'EnhancedMessagingPreferencesOPAC', value, >+ 'Show the patrons messaging preferences page in the OPAC', >+ NULL, 'YesNo' >+FROM systempreferences >+WHERE variable='EnhancedMessagingPreferences'; >diff --git a/opac/opac-messaging.pl b/opac/opac-messaging.pl >index b0c1cde..081d665 100755 >--- a/opac/opac-messaging.pl >+++ b/opac/opac-messaging.pl >@@ -35,6 +35,12 @@ use C4::Form::MessagingPreferences; > > 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', >-- >1.9.1
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 9254
:
14199
|
14244
|
14246
|
15010
|
15011
|
15764
|
15765
|
20332
|
38122
|
38123
|
38124
|
38513
|
38514
|
38515
|
38516
|
38517