Bugzilla – Attachment 46156 Details for
Bug 12528
Enable staff to deny message setting access to patrons on the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12528 - Rename OPACEnhancedMessagingPreferences and add redirect to 404 if at least 1 pref is off
Bug-12528---Rename-OPACEnhancedMessagingPreference.patch (text/plain), 5.19 KB, created by
Bouzid Fergani
on 2015-12-31 15:34:37 UTC
(
hide
)
Description:
Bug 12528 - Rename OPACEnhancedMessagingPreferences and add redirect to 404 if at least 1 pref is off
Filename:
MIME Type:
Creator:
Bouzid Fergani
Created:
2015-12-31 15:34:37 UTC
Size:
5.19 KB
patch
obsolete
>From a6ed9725abda1f47d3a94bfc2213fe07a88d54bb Mon Sep 17 00:00:00 2001 >From: Bouzid Fergani <bouzid.fergani@inlibro.com> >Date: Thu, 31 Dec 2015 10:30:30 -0500 >Subject: [PATCH] Bug 12528 - Rename OPACEnhancedMessagingPreferences and add > redirect to 404 if at least 1 pref is off > >--- > installer/data/mysql/atomicupdate/sysprefs_Bug12528.sql | 2 +- > .../intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref | 4 ++-- > koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc | 2 +- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt | 8 -------- > opac/opac-messaging.pl | 4 ++++ > 5 files changed, 8 insertions(+), 12 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/sysprefs_Bug12528.sql b/installer/data/mysql/atomicupdate/sysprefs_Bug12528.sql >index db5275d..793c119 100644 >--- a/installer/data/mysql/atomicupdate/sysprefs_Bug12528.sql >+++ b/installer/data/mysql/atomicupdate/sysprefs_Bug12528.sql >@@ -1,2 +1,2 @@ > INSERT INTO systempreferences ( value, variable, options, explanation,type ) >-select value ,'OPACEnhancedMessagingPreferences', NULL, 'If ON, allows patrons to select to receive additional messages about items due or nearly due.', 'YesNo' from systempreferences where variable='EnhancedMessagingPreferences'; >+select value ,'EnhancedMessagingPreferencesOPAC', NULL, 'If ON, allows patrons to select to receive additional messages about items due or nearly due.', 'YesNo' from systempreferences where variable='EnhancedMessagingPreferences'; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >index 689c708..91546ea 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >@@ -54,7 +54,7 @@ Patrons: > choices: > yes: Allow > no: "Don't allow" >- - "Staff to manage which notices patrons will receive and when they will receive them. Note: this only applies to courtesy notices. To manage if patrons have also access to these settings, use OPACEnhancedMessagingPreferences." >+ - "Staff to manage which notices patrons will receive and when they will receive them. Note: this only applies to courtesy notices. To manage if patrons have also access to these settings, use EnhancedMessagingPreferencesOPAC." > - > - pref: ExtendedPatronAttributes > choices: >@@ -160,7 +160,7 @@ Patrons: > no: "Don't" > - charge a fee when a patron changes to a category with an enrollment fee. > - >- - pref: OPACEnhancedMessagingPreferences >+ - pref: EnhancedMessagingPreferencesOPAC > choices: > yes: Show > no: "Don't show" >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >index a8b0a5e..9afa331 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc >@@ -77,7 +77,7 @@ > [% END %] > > [% IF ( EnhancedMessagingPreferences ) %] >- [% IF Koha.Preference( 'OPACEnhancedMessagingPreferences' ) %] >+ [% IF Koha.Preference( 'EnhancedMessagingPreferencesOPAC' ) %] > [% IF ( messagingview ) %] > <li class="active"> > [% ELSE %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >index a1fba38..b82577c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >@@ -22,8 +22,6 @@ > </div> > </div> > <div class="span10"> >- [% IF Koha.Preference( 'EnhancedMessagingPreferences' ) %] >- [% IF Koha.Preference( 'OPACEnhancedMessagingPreferences' ) %] > <div id="usermessaging"> > <h3>Your messaging settings</h3> > [% IF ( settings_updated ) %] >@@ -131,12 +129,6 @@ > </fieldset> > </form> > </div> <!-- / #usermessaging --> >- [% ELSE %] >- <h4>You are not allowed to call this page directly</h4> >- [% END %] >- [% ELSE %] >- <h4>You are not allowed to call this page directly</h4> >- [% END %] > </div> <!-- / .span10 --> > </div> <!-- / .row-fluid --> > </div> <!-- / .container-fluid --> >diff --git a/opac/opac-messaging.pl b/opac/opac-messaging.pl >index 8ccc500..9a035b1 100755 >--- a/opac/opac-messaging.pl >+++ b/opac/opac-messaging.pl >@@ -34,6 +34,10 @@ use C4::Form::MessagingPreferences; > > my $query = CGI->new(); > >+unless ( C4::Context->preference('EnhancedMessagingPreferencesOPAC') && 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 12528
:
29505
|
30259
|
30348
|
30349
|
30487
|
31047
|
36511
|
36512
|
36513
|
36818
|
44302
|
44820
|
44826
|
45885
|
45886
|
45962
|
46003
|
46015
|
46082
|
46156
|
46217
|
46218
|
50649
|
50650
|
50651
|
50652
|
50988
|
50989
|
51000
|
51001
|
51002
|
51003
|
51004