From 98f08fc340ae750ad0b8ea05a80b1c9ae47d8944 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 14 Feb 2014 11:25:54 +0100 Subject: [PATCH] Bug 11759: Batch checkout - DB changes Add the new pref batch_checkouts in DB. Signed-off-by: Josef Moravec Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 10 ++++++++++ .../prog/en/modules/admin/preferences/circulation.pref | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 5a9dd2abac..9e7b98bdcf 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -63,6 +63,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('BakerTaylorPassword','','','Baker & Taylor Password for Content Cafe (external content)','Free'), ('BakerTaylorUsername','','','Baker & Taylor Username for Content Cafe (external content)','Free'), ('BasketConfirmations','1','always ask for confirmation.|do not ask for confirmation.','When closing or reopening a basket,','Choice'), +('batch_checkouts','',NULL,'Allow patron categories allowed to checkout in a batch','Free'), ('BiblioAddsAuthorities','0',NULL,'If ON, adding a new biblio will check for an existing authority record and create one on the fly if one doesn\'t exist','YesNo'), ('BiblioDefaultView','normal','normal|marc|isbd','Choose the default detail view in the catalog; choose between normal, marc or isbd','Choice'), ('BibtexExportAdditionalFields', '', NULL , 'Define additional BibTex tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.', 'textarea'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 14c3547560..152df4266c 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -11120,6 +11120,16 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.21.00.XXX"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do(q| + INSERT IGNORE INTO systempreferences ( variable, value, options, explanation, type ) + VALUES ('batch_checkouts','','','Allow patron categories allowed to checkout in a batch','Free') + |); + print "Upgrade to $DBversion done (Bug 11759: Add batch_checkouts system preference)\n"; + SetVersion($DBversion); +} + # DEVELOPER PROCESS, search for anything to execute in the db_update directory # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index a936d813fc..8b13ac1018 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -712,3 +712,8 @@ Circulation: yes: Use no: "Don't use" - course reserves + Batch checkout: + - + - "Allow some patron categories to checkout in a batch" + - pref: batch_checkouts + - "(list of patron category separated with a pipe '|')" -- 2.39.5