From ed1da7925d879131d2538206509c301cb61411a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Mon, 27 Apr 2009 07:49:58 +0200 Subject: [PATCH] Bug 2920 DB Rev 028 AmazonReviews syspref Add AmazonReviews syspref. DOCUMENTATION: AmazonReviews is OPACAmazonReviews counterpart, except that in staff interface Editorial Review is displayed alone, without reader reviews. Signed-off-by: Galen Charlton --- installer/data/mysql/en/mandatory/sysprefs.sql | 1 + .../1-Obligatoire/unimarc_standard_systemprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 10 ++++++++-- kohaversion.pl | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index a15ac5ae92..d30904be94 100644 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -1,6 +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('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'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACAmazonEnabled',0,'Turn ON Amazon Content in the OPAC - You MUST set AWSAccessKeyID and AmazonAssocTag if enabled','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACAmazonSimilarItems',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 55130a191b..8d9faa4fed 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,6 +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('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'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACAmazonEnabled','0','Active ou non l''affichage du contenu Amazon à l''OPAC. - Vous DEVEZ définir AmazonDevKey et AmazonAssocTag si vous activez cette fonction','','YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OPACAmazonSimilarItems','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 65dd2843f7..ae9af90c7d 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -2319,8 +2319,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $DBversion = "3.01.00.021"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { my $enable_reviews = C4::Context->preference('OPACAmazonEnabled') ? '1' : '0'; - $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAmazonReviews', '$enable_reviews', 'Display Amazon readers reviews on OPAC','','YesNo'); - "); + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAmazonReviews', '$enable_reviews', 'Display Amazon readers reviews on OPAC','','YesNo')"); SetVersion ($DBversion); } @@ -2371,6 +2370,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.01.00.028'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + my $enable_reviews = C4::Context->preference('AmazonEnabled') ? '1' : '0'; + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AmazonReviews', '$enable_reviews', 'Display Amazon reviews on staff interface','','YesNo')"); + print "Upgrade to $DBversion done (added AmazonReviews)\n"; + SetVersion ($DBversion); +} =item DropAllForeignKeys($table) diff --git a/kohaversion.pl b/kohaversion.pl index c65b32d298..a5c7fd5a98 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -10,7 +10,7 @@ use strict; sub kohaversion { - our $VERSION = '3.01.00.027'; + our $VERSION = '3.01.00.028'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.5