From 183c9f46fd90cf49e15de3ee983b378c0dc5c461 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 21 Dec 2012 11:11:56 -0500 Subject: [PATCH] Bug 9254 - Problem with EnhancedMessagingPreferences - Followup - Rename pref to EnhancedMessagingPreferencesOPAC If the new pref is named EnhancedMessagingPreferencesOPAC, it will show up adjacent to EnhancedMessagingPreferences --- C4/Auth.pm | 2 +- installer/data/mysql/sysprefs.sql | 2 +- installer/data/mysql/updatedatabase.pl | 2 +- .../prog/en/modules/admin/preferences/patrons.pref | 2 +- koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index defca57..f3287eb 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -315,7 +315,7 @@ sub get_template_and_user { $template->param( "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1, EnhancedMessagingPreferences => C4::Context->preference('EnhancedMessagingPreferences'), - OPACEnhancedMessagingPreferences => C4::Context->preference('OPACEnhancedMessagingPreferences'), + EnhancedMessagingPreferencesOPAC => C4::Context->preference('EnhancedMessagingPreferencesOPAC'), 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 bfa4a70..4a0ef6b 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -400,4 +400,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacSeparateHoldings', '0', 'Separate current branch holdings from other holdings (OPAC)', NULL, 'YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacSeparateHoldingsBranch', 'homebranch', 'Branch used to separate holdings (OPAC)', 'homebranch|holdingbranch', 'Choice'); 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'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('EnhancedMessagingPreferencesOPAC',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 6c876a0..c9fc477 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6311,7 +6311,7 @@ if ( C4::Context->preference("Version") < TransformToNum($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')"); + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('EnhancedMessagingPreferencesOPAC',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); } 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 c914dae..2d16a08 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 @@ -62,7 +62,7 @@ Patrons: no: "Don't allow" - patrons to receive notices. Note that this only applies to certain kinds of notices. - - - pref: OPACEnhancedMessagingPreferences + - pref: EnhancedMessagingPreferencesOPAC choices: yes: Allow no: "Don't allow" diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc index b48db08..b475d16 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 ) %]
  • [% ELSE %]
  • [% END %]my purchase suggestions
  • [% END %] [% END %] - [% IF ( EnhancedMessagingPreferences && OPACEnhancedMessagingPreferences ) %] + [% IF ( EnhancedMessagingPreferences && EnhancedMessagingPreferencesOPAC ) %] [% IF ( messagingview ) %]
  • [% ELSE %]
  • [% END %]my messaging
  • [% END %] [% IF ( virtualshelves ) %] -- 1.7.2.5