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 <galen.charlton@liblime.com>
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');
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');
$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);
}
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)
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