From d7cd578e560696558e7da98703f725a38385796f 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 | 9 +++++++++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index b320bda..50d3270 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -417,3 +417,4 @@ INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ( INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UNIMARCField100Language', 'fre','UNIMARC field 100 default language',NULL,'short'); INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('Persona',0,'Use Mozilla Persona for login','','YesNo'); INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowHoldNotes',0,'Show hold notes on OPAC','','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 59d440b..1f0d449 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6453,6 +6453,15 @@ if(CheckVersion($DBversion)) { SetVersion($DBversion); } +$DBversion = "3.11.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 -- 1.7.7.6