Add AmazonReviews syspref.
DOCUMENTATION:
AmazonReviews is OPACAmazonReviews counterpart,
except that in staff interface Editorial Review
is displayed alone, without reader reviews.
---
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 a15ac5a..d30904b 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 55130a1..8d9faa4 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 65dd284..ae9af90 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 c65b32d..a5c7fd5 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
--
1.5.6.5
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches