Bug 10986: QA followup - fix various issues
authorJonathan Druart <jonathan.druart@biblibre.com>
Thu, 7 Nov 2013 13:24:07 +0000 (14:24 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Sat, 19 Apr 2014 17:20:38 +0000 (17:20 +0000)
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 <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Languages.pm
installer/data/mysql/sysprefs.sql
installer/data/mysql/updatedatabase.pl

index 75b9690..371b5be 100644 (file)
@@ -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'};
     }
index 13506d1..ad77acd 100644 (file)
@@ -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')
 ;
index 7e1d3fd..be7b574 100755 (executable)
@@ -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);
 }