From 3be496be38a8969729a1f54128b64a0ae065c328 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 11 Sep 2014 15:04:26 +0200 Subject: [PATCH 3/3] Bug 12872: Db revision for ZebraExclude pref Test plan: Run install or upgrade. Check insertion of pref into database. Check editing the value via interface. Signed-off-by: Paola Rossi --- installer/data/mysql/sysprefs.sql | 4 ++-- installer/data/mysql/updatedatabase.pl | 10 ++++++++++ .../prog/en/modules/admin/preferences/admin.pref | 7 +++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index b08a514..1879318 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -447,5 +447,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') -; +('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo'), +('ZebraExclude','',NULL,'Define some fields to exclude from Zebra indexing','Textarea'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 95832e5..f0b8552 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8820,6 +8820,16 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } + +$DBversion = "3.17.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES('ZebraExclude','', NULL,'Define some fields to exclude from Zebra indexing', 'Textarea') + }); + print "Upgrade to $DBversion done (Bug 12872 - Adding syspref ZebraExclude)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref index c16138c..afbc244 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref @@ -105,3 +105,10 @@ Administration: yes: Allow no: "Don't Allow" - Mozilla persona for login + Search Engine: + - + - Exclude the following fields from Zebra indexing. + - pref: ZebraExclude + default: '' + type: textarea + - You can include fields, subfields, field groups (see online help). When you change its value, you should probably reindex. -- 1.7.10.4