From 3950a9c9eb72fa8c116b0ed521ee2bc63880be71 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 7 Nov 2013 14:24:07 +0100 Subject: [PATCH] Bug 10986: QA followup - fix various issues This patch fixes some qa issues: FAIL C4/Languages.pm FAIL critic # Variables::ProhibitConditionalDeclarations: Got 1 violation(s). FAIL installer/data/mysql/updatedatabase.pl FAIL forbidden patterns forbidden pattern: merge marker (<<<<<<<) (line 7157) FAIL installer/data/mysql/sysprefs.sql FAIL sysprefs_order Not blocker: Sysprefs AdvancedSearchLanguages is bad placed (see bug 10610) Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton --- C4/Languages.pm | 2 +- installer/data/mysql/sysprefs.sql | 4 ++-- installer/data/mysql/updatedatabase.pl | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/C4/Languages.pm b/C4/Languages.pm index 75b9690b4c..371b5beb2b 100644 --- a/C4/Languages.pm +++ b/C4/Languages.pm @@ -203,7 +203,7 @@ sub getLanguages { my $dbh=C4::Context->dbh; my $default_language = 'en'; my $current_language = $default_language; - my $language_list=C4::Context->preference("AdvancedSearchLanguages") if $isFiltered; + my $language_list = $isFiltered ? C4::Context->preference("AdvancedSearchLanguages") : undef; if ($lang) { $current_language = regex_lang_subtags($lang)->{'language'}; } diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 13506d1c64..ad77acd7e5 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -6,6 +6,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('AcqWarnOnDuplicateInvoice','0','','Warn librarians when they try to create a duplicate invoice','YesNo'), ('AddPatronLists','categorycode','categorycode|category_type','Allow user to choose what list to pick up from when adding patrons','Choice'), ('advancedMARCeditor','0','','If ON, the MARC editor won\'t display field/subfield descriptions','YesNo'), +('AdvancedSearchLanguages','','','ISO 639-2 codes of languages you wish to see appear as an Advanced search option. Example: eng|fre|ita','Textarea'), ('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Select which set of fields comprise the Type limit in the advanced search','Choice'), ('AgeRestrictionMarker','',NULL,'Markers for age restriction indication, e.g. FSK|PEGI|Age|','free'), ('AgeRestrictionOverride','0',NULL,'Allow staff to check out an item with age restriction.','YesNo'), @@ -429,6 +430,5 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('XSLTResultsDisplay','default','','Enable XSL stylesheet control over results page display on intranet','Free'), ('yuipath','local','local|http://yui.yahooapis.com/2.5.1/build','Insert the path to YUI libraries, choose local if you use koha offline','Choice'), ('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'), -('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo'), -('AdvancedSearchLanguages','','','ISO 639-2 codes of languages you wish to see appear as an Advanced search option. Example: eng|fre|ita','Textarea') +('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo') ; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 7e1d3fdd0d..be7b5740db 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -7154,7 +7154,6 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } -<<<<<<< HEAD $DBversion = "3.13.00.023"; if ( CheckVersion($DBversion) ) { $dbh->do("ALTER TABLE borrowers CHANGE password password VARCHAR(60);"); @@ -7745,7 +7744,7 @@ if(CheckVersion($DBversion)) { $dbh->do(q{ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AcqItemSetSubfieldsWhenReceived','','Set subfields for item when items are created when receiving (e.g. o=5|a="foo bar")','','Free'); }); - print "Upgrade to $DBversion done (Added AcqItemSetSubfieldsWhenReceived syspref)\n"; + print "Upgrade to $DBversion done (Bug 10986: Added AcqItemSetSubfieldsWhenReceived syspref)\n"; SetVersion($DBversion); } -- 2.39.5