From 0ec2ee435e7265a69f12932d646dbd86412bc081 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Tue, 15 Dec 2009 11:22:33 +0100 Subject: [PATCH] [SIGNED-OFF] (bug #3924 MT2500) fix useDaysMode use Content-Type: text/plain; charset="utf-8" This fix system preference choices, and delete some useless code. Signed-off-by: Henri-Damien LAURENT Signed-off-by: Katrin Fischer Fix is for fr-FR sql file. All other langages correctly include all 3 possible options for useDaysMode. The patch also includes a database update. --- .../1-Obligatoire/unimarc_standard_systemprefs.sql | 4 ++-- installer/data/mysql/updatedatabase.pl | 8 ++++++++ kohaversion.pl | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) 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 185c74b..205281c 100755 --- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql @@ -120,7 +120,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('timeout', '30600', 'Ce paramètre définit la durée d''inactivité au delà de laquelle l''utilisateur (professionnel ou opac) est automatiquement déconnecté', '', 'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('TransfersMaxDaysWarning', '3', 'Délai maximum au delà duquel un transfert sera considéré comme ayant rencontré un problème', '', 'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('uppercasesurnames', '0', 'Force les noms de famille à être en majuscule', NULL, 'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('useDaysMode', 'Calendar', 'Comment calculer les dates de retour : ''Calendar'' signifie que les dates de retour sauteront les jours fermés. ''Days'' ignore le calendrier', 'Calendar|Days', 'Choice'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('useDaysMode', 'Calendar', 'Comment calculer les dates de retour : ''Calendar'' signifie que les dates de retour sauteront les jours fermés. ''Days'' ignore le calendrier', 'Calendar|Days|Datedue', 'Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('virtualshelves', '1', 'Si ce paramètre est activé, les adhérents (identifiés) peuvent créer des étagères virtuelles', '', 'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('z3950AuthorAuthFields', '701,702,700', 'Ce paramètre permet de remplir automatiquement le champ 200$f (s''il est vide) avec le champ 700$a. Utile pour l''affichage, mais pas vraiment rigoureux du point de vue de la norme UNIMARC.', '', ''); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('z3950NormalizeAuthor', '0', 'Si activé, les autorités auteur servent à remplir le champ 200$f s''il est vide (paramètre spécifique à l''UNIMARC', NULL, NULL); @@ -312,4 +312,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsField','','The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea'); -INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); \ No newline at end of file +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 52951e7..17074f4 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -4332,6 +4332,14 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.05.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("UPDATE systempreferences SET options = 'Calendar|Days|Datedue' WHERE variable = 'useDaysMode'"); + + print "Upgrade to $DBversion done (upgrade useDaysMode syspref)\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 DropAllForeignKeys($table) diff --git a/kohaversion.pl b/kohaversion.pl index c3b86a9..a780d8e 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts : use strict; sub kohaversion { - our $VERSION = '3.05.00.001'; + our $VERSION = '3.05.00.XXX'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 1.7.4.1