From 11f9f2ecd43ff790121cb086b7d1a60496b18388 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Mon, 3 Jan 2011 16:32:21 +0200 Subject: [PATCH] Bug 17913: Add AuthorityMergeMode preference Original patch from bug 5572, dating back to 2011! Amended by Marcel de Rooy January 2017. Renamed the pref. The fix on this report is based on this preference. Depending on the pref, subfields will be deleted or kept. Test plan: Run the dbrev. Signed-off-by: Marcel de Rooy Signed-off-by: Josef Moravec Signed-off-by: Julian Maurice --- installer/data/mysql/atomicupdate/bug_17913.perl | 7 +++++++ installer/data/mysql/sysprefs.sql | 1 + 2 files changed, 8 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_17913.perl diff --git a/installer/data/mysql/atomicupdate/bug_17913.perl b/installer/data/mysql/atomicupdate/bug_17913.perl new file mode 100644 index 0000000000..242f20b69c --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_17913.perl @@ -0,0 +1,7 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do( "INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES('AuthorityMergeMode','loose','loose|strict','Authority merge mode','Choice')"); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 17913 - AuthorityMergeMode)\n"; +} diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 872dbe3e95..a0826c1daa 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -43,6 +43,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('AudioAlerts','0','','Enable circulation sounds during checkin and checkout in the staff interface. Not supported by all web browsers yet.','YesNo'), ('AuthDisplayHierarchy','0','','Display authority hierarchies','YesNo'), ('AuthoritiesLog','1',NULL,'If ON, log edit/create/delete actions on authorities.','YesNo'), +('AuthorityMergeMode','loose','loose|strict','Authority merge mode','Choice'), ('AuthoritySeparator','--','10','Used to separate a list of authorities in a display. Usually --','free'), ('autoBarcode','OFF','incremental|annual|hbyymmincr|EAN13|OFF','Used to autogenerate a barcode: incremental will be of the form 1, 2, 3; annual of the form 2007-0001, 2007-0002; hbyymmincr of the form HB08010001 where HB=Home Branch','Choice'), ('AutoCreateAuthorities','0',NULL,'Automatically create authorities that do not exist when cataloging records.','YesNo'), -- 2.39.5