Bugzilla – Attachment 15010 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]
[SIGNED-OFF] Bug 9254: Problem with EnhancedMessagingPreferences
SIGNED-OFF-Bug-9254-Problem-with-EnhancedMessaging.patch (text/plain), 6.63 KB, created by
Bernardo Gonzalez Kriegel
on 2013-02-01 14:19:40 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 9254: Problem with EnhancedMessagingPreferences
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2013-02-01 14:19:40 UTC
Size:
6.63 KB
patch
obsolete
>From dc7a0840c00f8b912274d07c86afb59c3b027d86 Mon Sep 17 00:00:00 2001 >From: Vitor FERNANDES <vfernandes@keep.pt> >Date: Wed, 19 Dec 2012 18:39:10 +0000 >Subject: [PATCH] [SIGNED-OFF] Bug 9254: Problem with > EnhancedMessagingPreferences > >First I don't know the right component to this bug. > >The problem is the following: > >- when enabling EnhancedMessagingPreferences, the staff client if able to set the messaging preferences for the patrons categories, and then for the patron (normally the messaging preferences are the same for everyone) >- when enabling EnhancedMessagingPreferences, the patrons can set in the OPAC their messaging preferences, which can be against the library rules > >Solution: > >- enabling EnhancedMessagingPreferences, should allow the the staff client to set the patrons messaging preferences >- enabling EnhancedMessagingPreferences, should't allow patrons to set their messaging preferences (the link doesn't appear in the usermenu.inc) >- should be another preference to allow the patrons to set their messaging preferences. > >Test plan: > >- apply the patch >- enable EnhancedMessagingPreferences, the messaging page should appear in OPAC >- disable OPACEnhancedMessagingPreferences, the messaging page shouldn't appear in OPAC >- disable EnhancedMessagingPreferences, the messaging page shouldn't appear in OPAC > >Sponsored-by: KEEP SOLUTIONS >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Rebased on master (2013-02-01) >--- > C4/Auth.pm | 1 + > installer/data/mysql/sysprefs.sql | 2 ++ > installer/data/mysql/updatedatabase.pl | 8 ++++++++ > .../prog/en/modules/admin/preferences/patrons.pref | 8 +++++++- > koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc | 2 +- > 5 files changed, 19 insertions(+), 2 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 92f1d4c..4fdbf74 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -316,6 +316,7 @@ sub get_template_and_user { > $template->param( > "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1, > EnhancedMessagingPreferences => C4::Context->preference('EnhancedMessagingPreferences'), >+ OPACEnhancedMessagingPreferences => C4::Context->preference('OPACEnhancedMessagingPreferences'), > GoogleJackets => C4::Context->preference("GoogleJackets"), > OpenLibraryCovers => C4::Context->preference("OpenLibraryCovers"), > KohaAdminEmailAddress => "" . C4::Context->preference("KohaAdminEmailAddress"), >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 7e9f43d..a721d27 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -408,3 +408,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('NotesBlacklist','','List of notes fields that should not appear in the title notes/description separator of details',NULL,'free'); > INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('SCOUserCSS', '', NULL, 'Add CSS to be included in the SCO module in an embedded <style> tag.', 'free'); > INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('SCOUserJS', '', NULL, 'Define custom javascript for inclusion in the SCO module', 'free'); >+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('RenewalSendNotices','0', NULL, '', 'YesNo'); >+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACEnhancedMessagingPreferences',1, 'Show the patrons messaging preferences page in the OPAC', NULL, 'YesNo'); >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 5571d1e..b2cc760 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -6377,6 +6377,7 @@ if ( CheckVersion($DBversion) ) { > UPDATE userflags SET flagdesc="Add or modify patrons" where flag="borrowers"; > }); > $dbh->do(q{ >+ A > UPDATE userflags SET flagdesc="Use all tools (expand for granular tools permissions)" where flag="tools"; > }); > $dbh->do(q{ >@@ -6390,6 +6391,13 @@ if ( CheckVersion($DBversion) ) { > SetVersion ($DBversion); > } > >+$DBversion = "3.11.00.XXX"; >+if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACEnhancedMessagingPreferences',1, 'Show the patrons messaging preferences page in the OPAC', NULL, 'YesNo')"); >+ print "Upgrade to $DBversion done (Bug 9254: Problem with EnhancedMessagingPreferences) \n"; >+ SetVersion ($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >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 74d14af..c914dae 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 >@@ -60,7 +60,13 @@ Patrons: > choices: > yes: Allow > no: "Don't allow" >- - patrons to choose which notices they receive and when they receive them. Note that this only applies to certain kinds of notices. >+ - patrons to receive notices. Note that this only applies to certain kinds of notices. >+ - >+ - pref: OPACEnhancedMessagingPreferences >+ choices: >+ yes: Allow >+ no: "Don't allow" >+ - patrons to choose which notices they receive and when they receive them in the OPAC. Note that this only works if EnhancedMessagingPreferences is active. > - > - pref: ExtendedPatronAttributes > choices: >diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc >index 5a07d95..b48db08 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc >+++ b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc >@@ -26,7 +26,7 @@ > [% IF ( suggestionsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/opac-suggestions.pl">my purchase suggestions</a></li> > [% END %] > [% END %] >- [% IF ( EnhancedMessagingPreferences ) %] >+ [% IF ( EnhancedMessagingPreferences && OPACEnhancedMessagingPreferences ) %] > [% IF ( messagingview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/opac-messaging.pl">my messaging</a></li> > [% END %] > [% IF ( virtualshelves ) %] >-- >1.7.9.5
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