From 075e9a64f9f04ff629afbaa7971d646d837b199c 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 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. Signed-off-by: Bernardo Gonzalez Kriegel Preference removed, no koha-qa errors. Signed-off-by: Kyle M Hall Signed-off-by: Chris Cormack --- 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, 7 insertions(+), 8 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 1768d8a3e4..c6dda85f69 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -457,7 +457,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 => ($using_https ? "https://" : "http://") . $opac_base_url, diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index acfd24aa02..84a2065ab4 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -257,7 +257,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OpacMaintenance','0','','If ON, enables maintenance warning in OPAC','YesNo'), ('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'), ('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 d9551a7fbf..20b7c93e15 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8897,7 +8897,6 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } - $DBversion = "3.17.00.XXX"; if ( CheckVersion($DBversion) ) { $dbh->do("DELETE FROM systempreferences WHERE variable='OpacMainUserBlockMobile'"); @@ -8905,6 +8904,13 @@ 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 baa48e7e22..bd7b59fca2 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 @@ -186,11 +186,6 @@ OPAC: - pref: OPACUserCSS 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 -- 2.39.5