From b2ca89da66ba07d4029f9fcf5d9b61a84de7fbe2 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 | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 4b0f364..27893ee 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -236,6 +236,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OpacMaintenance','0','','If ON, enables maintenance warning in OPAC','YesNo'), ('OpacMainUserBlock','Welcome to Koha...\r\n
','70|10','A user-defined block of HTML in the main content area of the opac main page','Textarea'), ('OpacMainUserBlockMobile','',NULL,'Show the following HTML in its own column on the main page of the OPAC (mobile version):','free'), +('OPACMandatoryHoldNotes','',NULL,'Mandatory hold notes','Textarea'), ('OPACMobileUserCSS','',NULL,'Include the following CSS for the mobile view on all pages in the OPAC:','free'), ('OPACMySummaryHTML','','70|10','Enter the HTML that will appear in a column on the \'my summary\' and \'my reading history\' tabs when a user is logged in to the OPAC. Enter {BIBLIONUMBER}, {TITLE}, {AUTHOR}, or {ISBN} in place of their respective variables in the HTML. Leave blank to disable.','Textarea'), ('OpacNav','Important links here.','70|10','Use HTML tags to add navigational links to the left-hand navigational bar in OPAC','Textarea'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index a37ea02..c6a6f79 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -7146,7 +7146,6 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } - $DBversion = "3.13.00.022"; if ( CheckVersion($DBversion) ) { $dbh->do("DELETE from auth_tag_structure WHERE tagfield IN ('68a','68b')"); @@ -7155,6 +7154,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