From 767edc6bb9385d63a2f5994e8ef0cfab329cfaca Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 27 Apr 2015 15:55:31 +0200 Subject: [PATCH] Bug 12160: Rename intranetuserjs with IntranetUserJS To match IntranetUserCSS, intranetuserjs should be renamed IntranetUserJS. Test plan: 1/ Be sure there is no occurrence of intranetuserjs 2/ Confirm the pref still works as before Signed-off-by: Mark Tompsett NOTE: Worked before and after updatedatabase.pl, though after is less confusing to the person unaware of case insensitivity. Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- C4/Auth.pm | 4 ++-- ...Bug_12160-Rename_pref_intranetuserjs_to_IntranetUserJS.sql | 1 + installer/data/mysql/sysprefs.sql | 2 +- koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc | 4 ++-- .../prog/en/modules/admin/preferences/staff_client.pref | 2 +- .../intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt | 4 ++-- 6 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/Bug_12160-Rename_pref_intranetuserjs_to_IntranetUserJS.sql diff --git a/C4/Auth.pm b/C4/Auth.pm index e136753fe0..812b78c744 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -410,7 +410,7 @@ sub get_template_and_user { intranetreadinghistory => C4::Context->preference("intranetreadinghistory"), intranetstylesheet => C4::Context->preference("intranetstylesheet"), IntranetUserCSS => C4::Context->preference("IntranetUserCSS"), - intranetuserjs => C4::Context->preference("intranetuserjs"), + IntranetUserJS => C4::Context->preference("IntranetUserJS"), intranetbookbag => C4::Context->preference("intranetbookbag"), suggestion => C4::Context->preference("suggestion"), virtualshelves => C4::Context->preference("virtualshelves"), @@ -1196,7 +1196,7 @@ sub checkauth { intranetbookbag => C4::Context->preference("intranetbookbag"), IntranetNav => C4::Context->preference("IntranetNav"), IntranetFavicon => C4::Context->preference("IntranetFavicon"), - intranetuserjs => C4::Context->preference("intranetuserjs"), + IntranetUserJS => C4::Context->preference("IntranetUserJS"), IndependentBranches => C4::Context->preference("IndependentBranches"), AutoLocation => C4::Context->preference("AutoLocation"), wrongip => $info{'wrongip'}, diff --git a/installer/data/mysql/atomicupdate/Bug_12160-Rename_pref_intranetuserjs_to_IntranetUserJS.sql b/installer/data/mysql/atomicupdate/Bug_12160-Rename_pref_intranetuserjs_to_IntranetUserJS.sql new file mode 100644 index 0000000000..763cc7603d --- /dev/null +++ b/installer/data/mysql/atomicupdate/Bug_12160-Rename_pref_intranetuserjs_to_IntranetUserJS.sql @@ -0,0 +1 @@ +UPDATE systempreferences SET variable="IntranetUserJS" where variable="intranetuserjs" diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index f371193923..a1b518cb32 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -172,7 +172,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('IntranetSlipPrinterJS','','','Use this JavaScript for printing slips. Define at least function printThenClose(). For use e.g. with Firefox PlugIn jsPrintSetup, see http://jsprintsetup.mozdev.org/','Free'), ('intranetstylesheet','','50','Enter a complete URL to use an alternate layout stylesheet in Intranet','free'), ('IntranetUserCSS','',NULL,'Add CSS to be included in the intranet in an embedded [% IF ( IntranetUserCSS ) %][% END %] -[% IF ( intranetuserjs ) %] +[% IF ( IntranetUserJS ) %] [% END %] -- 2.39.5