From 6331705958edea035b5d0c837fa30b4b20476b26 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 4 Mar 2013 13:30:28 +0100 Subject: [PATCH] Bug 9743: dbrev for mandatory hold notes Content-Type: text/plain; charset=utf-8 Adds pref OPACMandatoryHoldNotes. Test plan: Run [your server]/cgi-bin/koha/installer/install.pl?step=3&op=updatestructure Optionally, run a new install to test sysprefs.sql. Or: Edit sysprefs.sql, leave at least the last few lines including the new one. And run from command line: mysql -p [yourdatabase] < [your-clone]/installer/data/mysql/sysprefs.sql --- installer/data/mysql/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 10 ++++++++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 0a3f20f..01f8902 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -428,3 +428,4 @@ INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) V INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHoldNotes',0,'Show hold notes on OPAC','','YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CalculateFinesOnReturn','1','Switch to control if overdue fines are calculated on return or not', '', 'YesNo'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AcqWarnOnDuplicateInvoice','0','Warn librarians when they try to create a duplicate invoice', '', 'YesNo'); +INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OPACMandatoryHoldNotes','','Mandatory hold notes','','Textarea'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index adc1e7f..0b1a91d 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -7036,6 +7036,16 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.13.00.XXX"; +if(CheckVersion($DBversion)) { + $dbh->do( +"INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OPACMandatoryHoldNotes','','Mandatory hold notes','','Textarea')" + ); + print "Upgrade to $DBversion done (Bug 9743: Mandatory opac hold notes under specified conditions)\n"; + SetVersion($DBversion); +} + + =head1 FUNCTIONS =head2 TableExists($table) -- 1.7.7.6