From f2cc57e987e56126118255b450bcf29af5674f7a 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. --- 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 ++-- .../intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref | 2 +- koha-tmpl/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 4b02701..08a4560 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -409,7 +409,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"), @@ -1195,7 +1195,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 0000000..763cc76 --- /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 d4c6409..590c4f4 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -171,7 +171,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.1.4