From 2859b9a25713a0cea22c89488c66e7c26845fc6e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 30 Aug 2021 15:18:40 +0200 Subject: [PATCH] Bug 26302: Make syspref's names start with uppercase --- C4/XSLT.pm | 2 +- installer/data/mysql/atomicupdate/bug_26302.perl | 6 +++--- installer/data/mysql/mandatory/sysprefs.sql | 4 ++-- .../prog/en/modules/admin/preferences/opac.pref | 4 ++-- .../bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 10 +++++----- t/db_dependent/XSLT.t | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index dd8d26f250c..57467eaf0ab 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -172,7 +172,7 @@ sub get_xslt_sysprefs { TrackClicks opacthemes IdRef OpacSuppression OPACResultsLibrary OPACShowOpenURL OpenURLResolverURL OpenURLImageLocation - resultsMaxItems resultsMaxItemsUnavailable + ResultsMaxItems ResultsMaxItemsUnavailable OpenURLText OPACShowMusicalInscripts OPACPlayMusicalInscripts / ) { my $sp = C4::Context->preference( $syspref ); diff --git a/installer/data/mysql/atomicupdate/bug_26302.perl b/installer/data/mysql/atomicupdate/bug_26302.perl index fb3c93c9917..80b91be718f 100644 --- a/installer/data/mysql/atomicupdate/bug_26302.perl +++ b/installer/data/mysql/atomicupdate/bug_26302.perl @@ -2,8 +2,8 @@ $DBversion = 'XXX'; # will be replaced by the RM if( CheckVersion( $DBversion ) ) { $dbh->do(q| INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES - ('resultsMaxItems','1','','Maximum number of available items displayed in search results','Integer'), - ('resultsMaxItemsUnavailable','0','','Maximum number of unavailable items displayed in search results','Integer') + ('ResultsMaxItems','1','','Maximum number of available items displayed in search results','Integer'), + ('ResultsMaxItemsUnavailable','0','','Maximum number of unavailable items displayed in search results','Integer') |); - NewVersion( $DBversion, 26302, "Add preferences resultsMaxItems and resultsMaxItemsUnavailable"); + NewVersion( $DBversion, 26302, "Add preferences ResultsMaxItems and ResultsMaxItemsUnavailable"); } diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 4e600fd0bb0..7d42637a3ac 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -575,8 +575,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('RestrictedPageContent','',NULL,'HTML content of the restricted page','TextArea'), ('RestrictedPageTitle','',NULL,'Title of the restricted page (breadcrumb and header)','Free'), ('RestrictionBlockRenewing','0',NULL,'If patron is restricted, should renewal be allowed or blocked','YesNo'), -('resultsMaxItems','1','','Maximum number of available items displayed in search results','Integer'), -('resultsMaxItemsUnavailable','0','','Maximum number of unavailable items displayed in search results','Integer'), +('ResultsMaxItems','1','','Maximum number of available items displayed in search results','Integer'), +('ResultsMaxItemsUnavailable','0','','Maximum number of unavailable items displayed in search results','Integer'), ('ReturnBeforeExpiry','0',NULL,'If ON, checkout will be prevented if returndate is after patron card expiry','YesNo'), ('ReturnLog','1',NULL,'If ON, enables the circulation (returns) log','YesNo'), ('ReturnpathDefault','',NULL,'Use this email address as return path or bounce address for undeliverable emails','Free'), 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 7f6dc576472..d2600c5cc9e 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 @@ -345,9 +345,9 @@ OPAC: - "(Use | as delimiter.)" - - Show no more than - - pref: resultsMaxItems + - pref: ResultsMaxItems - (available) individual items on the OPAC XSLT search results, and show no more than - - pref: resultsMaxItemsUnavailable + - pref: ResultsMaxItemsUnavailable - "'really unavailable' individual items in categories like Checked out, Damaged, On Hold, etc." Features: diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl index 9d058df7a83..c46e6f3c943 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl @@ -23,8 +23,8 @@ - - + + @@ -1284,7 +1284,7 @@ - + @@ -1307,7 +1307,7 @@ - + @@ -1342,7 +1342,7 @@ - + : diff --git a/t/db_dependent/XSLT.t b/t/db_dependent/XSLT.t index d7f41c81a8e..38079fecdca 100755 --- a/t/db_dependent/XSLT.t +++ b/t/db_dependent/XSLT.t @@ -52,7 +52,7 @@ subtest 'buildKohaItemsNamespace status tests' => sub { t::lib::Mocks::mock_preference('Reference_NFL_Statuses', '1|2'); t::lib::Mocks::mock_preference( 'OPACResultsLibrary', 'holdingbranch' ); - t::lib::Mocks::mock_preference( 'resultsMaxItems', '2' ); + t::lib::Mocks::mock_preference( 'ResultsMaxItems', '2' ); my $itype = $builder->build_object({ class => 'Koha::ItemTypes' }); my $itemtype = $builder->build_object({ class => 'Koha::ItemTypes' }); -- 2.25.1