From 04586395664ee7889f946a02134e2c9dd416f0d4 Mon Sep 17 00:00:00 2001 From: Michael Hafen Date: Mon, 10 Aug 2009 17:17:29 -0600 Subject: [PATCH] Allow the reserve date to be set on holds - sysprefs This is the two system preferences controlling this feature, and the updatedatabase addition using db verion 3.01.00.040 Signed-off-by: Galen Charlton --- admin/systempreferences.pl | 2 ++ installer/data/mysql/en/mandatory/sysprefs.sql | 2 ++ .../fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql | 2 ++ installer/data/mysql/updatedatabase.pl | 8 ++++++++ kohaversion.pl | 2 +- 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index 15bf60816e..250374ebf5 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -164,6 +164,7 @@ $tabsysprefs{BranchTransferLimitsType} = "Circulation"; $tabsysprefs{AllowNotForLoanOverride} = "Circulation"; $tabsysprefs{RenewalPeriodBase} = "Circulation"; $tabsysprefs{FilterBeforeOverdueReport} = "Circulation"; +$tabsysprefs{AllowHoldDateInFuture} = "Circulation"; # Staff Client $tabsysprefs{TemplateEncoding} = "StaffClient"; @@ -307,6 +308,7 @@ $tabsysprefs{OPACViewOthersSuggestions} = "OPAC"; $tabsysprefs{URLLinkText} = "OPAC"; $tabsysprefs{OPACShelfBrowser} = "OPAC"; $tabsysprefs{OPACDisplayRequestPriority} = "OPAC"; +$tabsysprefs{OPACAllowHoldDateInFuture} = "OPAC"; # OPAC $tabsysprefs{SearchMyLibraryFirst} = "OPAC"; diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index e10058f946..b2ace6fcdb 100644 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -1,5 +1,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('acquisitions','normal','Choose Normal, budget-based acquisitions, or Simple bibliographic-data acquisitions','simple|normal','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('advancedMARCeditor',0,'If ON, the MARC editor won\'t display field/subfield descriptions','','YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowHoldDateInFuture','0','If set a date field is displayed on the Hold screen of the Staff Interface, allowing the hold date to be set in the future.','','YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACAllowHoldDateInFuture','0','If set, along with the AllowHoldDateInFuture system preference, OPAC users can set the date of a hold to be in the future.','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonEnabled',0,'Turn ON Amazon Content - You MUST set AWSAccessKeyID and AmazonAssocTag if enabled','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonReviews',0,'Display Amazon review on staff interface - You MUST set AWSAccessKeyID and AmazonAssocTag if enabled','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonSimilarItems',0,'Turn ON Amazon Similar Items feature - You MUST set AWSAccessKeyID and AmazonAssocTag if enabled','','YesNo'); diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql index 5fa55c0df1..5effe28842 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql @@ -1,5 +1,7 @@ set NAMES 'utf8'; INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('advancedMARCeditor', '0', 'Si ce paramètre est mis à 1, l''éditeur MARC n''affichera pas les libellés des champs/sous-champs, seulement leur code. Devrait être à 0 dans la plupart des cas.', '', ''); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowHoldDateInFuture','0','Si Activé, un champ date est affiché à l''écran des réservations pour l''intranet, permettant de positionner la date de réservation dans le futur.','','YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OPACAllowHoldDateInFuture','0','Si Activé avec AllowHoldDateInFuture, Les utilisateurs à l''OPAC peuvent positionner la date de réservation dans le futur.','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonEnabled', '0', 'Ce paramètre active la récupération des images de couverture sur Amazon. Vous DEVEZ positionner AmazonDevKey AmazonAssocTag si vous activez cette option', '', 'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonReviews',0,'Affiche dans l''interface pro la description Amazon des livres - Vous DEVEZ définir AmazonDevKey et AmazonAssocTag si vous activez cette fonction','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AmazonSimilarItems','0','Active ou non les fonctions Amazon ''les lecteurs ayant acheté...'' - Vous DEVEZ définir AmazonDevKey et AmazonAssocTag si vous activez cette fonction','','YesNo'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 4954962f83..a10585c4b5 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -2488,6 +2488,14 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { print "Upgrade to $DBversion done (added SpineLabelFormat and SpineLabelAutoPrint sysprefs)\n"; } +$DBversion = '3.01.00.040'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('AllowHoldDateInFuture','0','If set a date field is displayed on the Hold screen of the Staff Interface, allowing the hold date to be set in the future.','','YesNo')"); + $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('OPACAllowHoldDateInFuture','0','If set, along with the AllowHoldDateInFuture system preference, OPAC users can set the date of a hold to be in the future.','','YesNo')"); + SetVersion ($DBversion); + print "Upgrade to $DBversion done (AllowHoldDateInFuture and OPACAllowHoldDateInFuture sysprefs)\n"; +} + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table diff --git a/kohaversion.pl b/kohaversion.pl index 5509870eac..98eeb318bf 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -10,7 +10,7 @@ use strict; sub kohaversion { - our $VERSION = '3.01.00.039'; + our $VERSION = '3.01.00.040'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.5