From 39e54b97f5bf9892a0e604238772ad18518b7d0a Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 1 Jul 2014 11:42:30 -0400 Subject: [PATCH] Bug 12245 - PROG/CCSR deprecation: Remove OPACMobileUserCSS system preference Content-Type: text/plain; charset="utf-8" With CCSR now deprecated there is no longer a need for the OPACMobileUserCSS system preference. This patch removes it. To test, apply the patch and run updatedatabase. Check that the preference can no longer be found in system preferences. --- C4/Auth.pm | 1 - installer/data/mysql/sysprefs.sql | 1 - installer/data/mysql/updatedatabase.pl | 8 ++++++++ .../prog/en/modules/admin/preferences/opac.pref | 5 ----- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index c04253a..6ac5e78 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -422,7 +422,6 @@ sub get_template_and_user { OPACShelfBrowser => "". C4::Context->preference("OPACShelfBrowser"), OPACURLOpenInNewWindow => "" . C4::Context->preference("OPACURLOpenInNewWindow"), OPACUserCSS => "". C4::Context->preference("OPACUserCSS"), - OPACMobileUserCSS => "". C4::Context->preference("OPACMobileUserCSS"), OPACViewOthersSuggestions => "" . C4::Context->preference("OPACViewOthersSuggestions"), OpacAuthorities => C4::Context->preference("OpacAuthorities"), OPACBaseURL => ($in->{'query'}->https() ? "https://" : "http://") . $ENV{'SERVER_NAME'} . diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index d41ef74..87c4562 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -253,7 +253,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OpacMainUserBlock','Welcome to Koha...\r\n
','70|10','A user-defined block of HTML in the main content area of the opac main page','Textarea'), ('OpacMainUserBlockMobile','',NULL,'Show the following HTML in its own column on the main page of the OPAC (mobile version):','free'), ('OpacMaxItemsToDisplay','50','','Max items to display at the OPAC on a biblio detail','Integer'), -('OPACMobileUserCSS','',NULL,'Include the following CSS for the mobile view on all pages in the OPAC:','free'), ('OPACMySummaryHTML','','70|10','Enter the HTML that will appear in a column on the \'my summary\' and \'my reading history\' tabs when a user is logged in to the OPAC. Enter {BIBLIONUMBER}, {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the HTML. Leave blank to disable.','Textarea'), ('OPACMySummaryNote','','','Note to display on the patron summary page. This note only appears if the patron is connected.','Free'), ('OpacNav','Important links here.','70|10','Use HTML tags to add navigational links to the left-hand navigational bar in OPAC','Textarea'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index c68ba51..5734a00 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8560,6 +8560,14 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } + +$DBversion = "3.17.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do("DELETE FROM systempreferences WHERE variable='OPACMobileUserCSS'"); + print "Upgrade to $DBversion done ( Bug 12245 - PROG/CCSR deprecation: Remove OPACMobileUserCSS system preference )\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref index 1304cef..498163d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -189,11 +189,6 @@ OPAC: type: textarea class: code - - - "Include the following CSS for the mobile view on all pages in the OPAC:" - - pref: OPACMobileUserCSS - type: textarea - class: code - - - "Show the following HTML in its own column on the main page of the OPAC:" - pref: OpacMainUserBlock type: textarea -- 1.7.9.5