Merge in HEAD, up to 9866.
This commit is contained in:
parent
c7a66861a6
commit
2bd7a60a01
107 changed files with 6258 additions and 2436 deletions
BIN
docs/upgrades/packages-7.7.0/admin_console.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.0/admin_console.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.7.0/admin_console2.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.0/admin_console2.wgpkg
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
docs/upgrades/packages-7.7.0/matrix-default-screenshots.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.0/matrix-default-screenshots.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.7.0/matrix-default-view-template.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.0/matrix-default-view-template.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.7.0/root_import_account_shop.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.0/root_import_account_shop.wgpkg
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
docs/upgrades/packages-7.7.0/survey-root_import_prop-style.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.0/survey-root_import_prop-style.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.7.0/survey.css.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.0/survey.css.wgpkg
Normal file
Binary file not shown.
|
|
@ -254,7 +254,7 @@ sub upgradeMatrix {
|
|||
my $session = shift;
|
||||
print "\tUpgrading matrix assets... \n" unless $quiet;
|
||||
my $db = $session->db;
|
||||
$db->write("alter table Matrix drop column groupToRate, drop column groupToAdd, drop column privilegedGroup,
|
||||
$db->write("alter table Matrix drop column groupToRate, drop column privilegedGroup,
|
||||
drop column ratingTimeout, drop column ratingTimeoutPrivileged, drop column ratingDetailTemplateId,
|
||||
drop column visitorCacheTimeout");
|
||||
$db->write("alter table Matrix add column defaultSort char(22) not null default 'score',
|
||||
|
|
@ -337,6 +337,7 @@ sub upgradeMatrix {
|
|||
$listing->{title} = $listing->{productName};
|
||||
$listing->{version} = $listing->{versionNumber};
|
||||
$listing->{screenshots} = $listing->{storageId};
|
||||
$listing->{ownerUserId} = $listing->{maintainerId};
|
||||
$listing->{productURL} = $listing->{productUrl};
|
||||
$listing->{manufacturerURL} = $listing->{manufacturerUrl};
|
||||
my $newMatrixListing = $matrix->addChild($listing,undef,undef,{skipAutoCommitWorkflows=>1});
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@ use Getopt::Long;
|
|||
use WebGUI::Session;
|
||||
use WebGUI::Storage;
|
||||
use WebGUI::Asset;
|
||||
|
||||
use WebGUI::PassiveAnalytics::Rule;
|
||||
use WebGUI::Utility;
|
||||
|
||||
my $toVersion = '7.7.0';
|
||||
my $quiet; # this line required
|
||||
|
|
@ -34,8 +35,282 @@ my $session = start(); # this line required
|
|||
installStoryManagerTables($session);
|
||||
upgradeConfigFiles($session);
|
||||
|
||||
addGroupToAddToMatrix( $session );
|
||||
addScreenshotTemplatesToMatrix( $session );
|
||||
surveyDoAfterTimeLimit($session);
|
||||
surveyRemoveResponseTemplate($session);
|
||||
surveyEndWorkflow($session);
|
||||
installAssetHistory($session);
|
||||
|
||||
# Passive Analytics
|
||||
pa_installLoggingTables($session);
|
||||
pa_installPassiveAnalyticsRule($session);
|
||||
pa_installPassiveAnalyticsConfig($session);
|
||||
pa_installWorkflow($session);
|
||||
pa_addPassiveAnalyticsSettings($session);
|
||||
pa_addPassiveAnalyticsStatus($session);
|
||||
|
||||
# vendor payouts
|
||||
addTransactionItemFlags( $session );
|
||||
createShopAcccountPluginSettings( $session );
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub addGroupToAddToMatrix {
|
||||
my $session = shift;
|
||||
print "\tAdding groupToAdd to Matrix table, if needed... \n" unless $quiet;
|
||||
my $sth = $session->db->read('describe Matrix groupToAdd');
|
||||
if (! defined $sth->hashRef) {
|
||||
$session->db->write("alter table Matrix add column groupToAdd char(22) default 2");
|
||||
}
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub addScreenshotTemplatesToMatrix {
|
||||
my $session = shift;
|
||||
print "\tAdding screenshot templates to Matrix table \n" unless $quiet;
|
||||
|
||||
$session->db->write("alter table Matrix add screenshotsConfigTemplateId char(22);");
|
||||
$session->db->write("update Matrix set screenshotsConfigTemplateId = 'matrixtmpl000000000007';");
|
||||
$session->db->write("alter table Matrix add screenshotsTemplateId char(22);");
|
||||
$session->db->write("update Matrix set screenshotsTemplateId = 'matrixtmpl000000000006';");
|
||||
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub surveyDoAfterTimeLimit {
|
||||
my $session = shift;
|
||||
print "\tAdding column doAfterTimeLimit to Survey table... " unless $quiet;
|
||||
$session->db->write('alter table Survey add doAfterTimeLimit char(22)');
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub surveyEndWorkflow {
|
||||
my $session = shift;
|
||||
print "\tAdding column onSurveyEndWorkflowId to Survey table... " unless $quiet;
|
||||
$session->db->write('alter table Survey add onSurveyEndWorkflowId varchar(22) character set utf8 collate utf8_bin');
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub surveyRemoveResponseTemplate {
|
||||
my $session = shift;
|
||||
print "\tRemoving responseTemplate... " unless $quiet;
|
||||
$session->db->write('alter table Survey drop responseTemplateId');
|
||||
if (my $template = WebGUI::Asset->new($session, 'PBtmpl0000000000000064')) {
|
||||
$template->purge();
|
||||
}
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub installAssetHistory {
|
||||
my $session = shift;
|
||||
print "\tAdding Asset History content handler... \n" unless $quiet;
|
||||
##Content Handler
|
||||
my $contentHandlers = $session->config->get('contentHandlers');
|
||||
if (! isIn('WebGUI::Content::Handler', @{ $contentHandlers }) ) {
|
||||
my @newHandlers = ();
|
||||
foreach my $handler (@{ $contentHandlers }) {
|
||||
push @newHandlers, $handler;
|
||||
push @newHandlers, 'WebGUI::Content::AssetHistory' if
|
||||
$handler eq 'WebGUI::Content::Account';
|
||||
}
|
||||
$session->config->set('contentHandlers', \@newHandlers);
|
||||
}
|
||||
##Admin Console
|
||||
$session->config->addToHash('adminConsole', 'assetHistory', {
|
||||
"icon" => "assetHistory.gif",
|
||||
"groupSetting" => "groupIdAdminHistory",
|
||||
"uiLevel" => 5,
|
||||
"url" => "^PageUrl(\"\",op=assetHistory);",
|
||||
"title" => "^International(assetHistory,Asset);"
|
||||
});
|
||||
##Setting for custom group
|
||||
$session->setting->add('groupIdAdminHistory', 12);
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub pa_installLoggingTables {
|
||||
my $session = shift;
|
||||
print "\tInstall logging tables... " unless $quiet;
|
||||
my $db = $session->db;
|
||||
$db->write(<<EOT1);
|
||||
DROP TABLE IF EXISTS `passiveLog`
|
||||
EOT1
|
||||
$db->write(<<EOT1);
|
||||
CREATE TABLE `passiveLog` (
|
||||
`userId` varchar(22) character set utf8 collate utf8_bin NOT NULL default '',
|
||||
`assetId` varchar(22) character set utf8 collate utf8_bin NOT NULL default '',
|
||||
`sessionId` varchar(22) character set utf8 collate utf8_bin NOT NULL default '',
|
||||
`timeStamp` bigint(20),
|
||||
`url` varchar(255) character set utf8 collate utf8_bin NOT NULL default ''
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
EOT1
|
||||
$db->write(<<EOT2);
|
||||
DROP TABLE IF EXISTS `deltaLog`
|
||||
EOT2
|
||||
$db->write(<<EOT2);
|
||||
CREATE TABLE `deltaLog` (
|
||||
`userId` varchar(22) character set utf8 collate utf8_bin NOT NULL default '',
|
||||
`assetId` varchar(22) character set utf8 collate utf8_bin NOT NULL default '',
|
||||
`delta` integer,
|
||||
`timeStamp` bigint(20),
|
||||
`url` varchar(255) character set utf8 collate utf8_bin NOT NULL default ''
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
EOT2
|
||||
$db->write(<<EOT3);
|
||||
DROP TABLE IF EXISTS `bucketLog`
|
||||
EOT3
|
||||
$db->write(<<EOT3);
|
||||
CREATE TABLE `bucketLog` (
|
||||
`userId` varchar(22) character set utf8 collate utf8_bin NOT NULL default '',
|
||||
`Bucket` varchar(22) character set utf8 collate utf8_bin NOT NULL default '',
|
||||
`duration` integer,
|
||||
`timeStamp` datetime
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
EOT3
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Add the PassiveAnalytics Rule table
|
||||
sub pa_installPassiveAnalyticsRule {
|
||||
my $session = shift;
|
||||
print "\tInstall Passive Analytics rule table, via Crud... " unless $quiet;
|
||||
# and here's our code
|
||||
WebGUI::PassiveAnalytics::Rule->crud_createTable($session);
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Add the PassiveAnalytics Settings
|
||||
sub pa_addPassiveAnalyticsSettings {
|
||||
my $session = shift;
|
||||
print "\tInstall Passive Analytics settings... " unless $quiet;
|
||||
# and here's our code
|
||||
$session->setting->add('passiveAnalyticsInterval', 300);
|
||||
$session->setting->add('passiveAnalyticsDeleteDelta', 0);
|
||||
$session->setting->add('passiveAnalyticsEnabled', 0);
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Add the PassiveAnalytics Rule table
|
||||
sub pa_addPassiveAnalyticsStatus {
|
||||
my $session = shift;
|
||||
my $db = $session->db;
|
||||
print "\tInstall Passive Analytics status table... " unless $quiet;
|
||||
# and here's our code
|
||||
$db->write(<<EOT2);
|
||||
DROP TABLE if exists passiveAnalyticsStatus;
|
||||
EOT2
|
||||
$db->write(<<EOT3);
|
||||
CREATE TABLE `passiveAnalyticsStatus` (
|
||||
`startDate` datetime,
|
||||
`endDate` datetime,
|
||||
`running` integer(2) DEFAULT 0,
|
||||
`userId` varchar(22) character set utf8 collate utf8_bin NOT NULL default ''
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
EOT3
|
||||
$db->write('insert into passiveAnalyticsStatus (userId) VALUES (3)');
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Add the Passive Analytics config file entry
|
||||
# for the adminConsole and the content handler
|
||||
sub pa_installPassiveAnalyticsConfig {
|
||||
my $session = shift;
|
||||
print "\tAdd Passive Analytics entry to the config file... " unless $quiet;
|
||||
# Admin Bar/Console
|
||||
my $adminConsole = $session->config->get('adminConsole');
|
||||
if (!exists $adminConsole->{'passiveAnalytics'}) {
|
||||
$adminConsole->{'passiveAnalytics'} = {
|
||||
"icon" => "passiveAnalytics.png",
|
||||
"uiLevel" => 1,
|
||||
"url" => "^PageUrl(\"\",op=passiveAnalytics;func=editRuleflow);",
|
||||
"title" => "^International(Passive Analytics,PassiveAnalytics);",
|
||||
"groupSetting" => "3",
|
||||
};
|
||||
$session->config->set('adminConsole', $adminConsole);
|
||||
}
|
||||
# Content Handler
|
||||
my $contentHandlers = $session->config->get('contentHandlers');
|
||||
if (!isIn('WebGUI::Content::PassiveAnalytics',@{ $contentHandlers} ) ) {
|
||||
my $contentIndex = 0;
|
||||
HANDLER: while ($contentIndex <= $#{ $contentHandlers } ) {
|
||||
##Insert before Operation
|
||||
if($contentHandlers->[$contentIndex] eq 'WebGUI::Content::Operation') {
|
||||
splice @{ $contentHandlers }, $contentIndex, 0, 'WebGUI::Content::PassiveAnalytics';
|
||||
last HANDLER;
|
||||
}
|
||||
++$contentIndex;
|
||||
}
|
||||
$session->config->set('contentHandlers', $contentHandlers);
|
||||
}
|
||||
# Workflow Activities
|
||||
my $workflowActivities = $session->config->get('workflowActivities');
|
||||
my @none = @{ $workflowActivities->{'None'} };
|
||||
if (!isIn('WebGUI::Workflow::Activity::SummarizePassiveAnalytics', @none)) {
|
||||
push @none, 'WebGUI::Workflow::Activity::SummarizePassiveAnalytics';
|
||||
}
|
||||
if (!isIn('WebGUI::Workflow::Activity::BucketPassiveAnalytics', @none)) {
|
||||
push @none, 'WebGUI::Workflow::Activity::BucketPassiveAnalytics';
|
||||
}
|
||||
$workflowActivities->{'None'} = [ @none ];
|
||||
$session->config->set('workflowActivities', $workflowActivities);
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Add the Passive Analytics Workflow
|
||||
sub pa_installWorkflow {
|
||||
my $session = shift;
|
||||
print "\tAdd Passive Analytics Workflow... " unless $quiet;
|
||||
my $workflow = WebGUI::Workflow->create(
|
||||
$session,
|
||||
{
|
||||
title => 'Analyze Passive Analytics',
|
||||
mode => 'singleton',
|
||||
type => 'None',
|
||||
description => 'Manual changes to this workflow will be lost. Please only use the Passive Analytics screen to make changes',
|
||||
},
|
||||
'PassiveAnalytics000001',
|
||||
);
|
||||
my $summarize = $workflow->addActivity('WebGUI::Workflow::Activity::SummarizePassiveAnalytics');
|
||||
my $bucket = $workflow->addActivity('WebGUI::Workflow::Activity::BucketPassiveAnalytics');
|
||||
$summarize->set('title', 'Perform duration analysis');
|
||||
$bucket->set( 'title', 'Please log entries into buckets');
|
||||
$workflow->set({enabled => 1});
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub addTransactionItemFlags {
|
||||
my $session = shift;
|
||||
print "\tAdding columns for vendor payout tracking to transaction items..." unless $quiet;
|
||||
|
||||
$session->db->write('alter table transactionItem add column vendorPayoutStatus char(10) default \'NotPaid\'');
|
||||
$session->db->write('alter table transactionItem add column vendorPayoutAmount float (6,2) default 0.00');
|
||||
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub createShopAcccountPluginSettings {
|
||||
my $session = shift;
|
||||
print "Creating default settings for the account plugin..." unless $quiet;
|
||||
|
||||
$session->setting->add('shopMySalesTemplateId', '-zxyB-O50W8YnL39Ouoc4Q');
|
||||
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Describe what our function does
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ sub upgradeMatrix {
|
|||
my $session = shift;
|
||||
print "\tUpgrading matrix assets... \n" unless $quiet;
|
||||
my $db = $session->db;
|
||||
$db->write("alter table Matrix drop column groupToRate, drop column groupToAdd, drop column privilegedGroup,
|
||||
$db->write("alter table Matrix drop column groupToRate, drop column privilegedGroup,
|
||||
drop column ratingTimeout, drop column ratingTimeoutPrivileged, drop column ratingDetailTemplateId,
|
||||
drop column visitorCacheTimeout");
|
||||
$db->write("alter table Matrix add column defaultSort char(22) not null default 'score',
|
||||
|
|
@ -144,6 +144,7 @@ sub upgradeMatrix {
|
|||
$listing->{title} = $listing->{productName};
|
||||
$listing->{version} = $listing->{versionNumber};
|
||||
$listing->{screenshots} = $listing->{storageId};
|
||||
$listing->{ownerUserId} = $listing->{maintainerId};
|
||||
$listing->{productURL} = $listing->{productUrl};
|
||||
$listing->{manufacturerURL} = $listing->{manufacturerUrl};
|
||||
my $newMatrixListing = $matrix->addChild($listing,undef,undef,{skipAutoCommitWorkflows=>1});
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ sub setDefaultItransactCredentialTemplate {
|
|||
my $drivers = $pay->getPaymentGateways($session);
|
||||
DRIVER: foreach my $driver (@{ $drivers }) {
|
||||
##Only work on ITransact drivers
|
||||
next DRIVER unless $driver->className eq "WebGUI::Shop::PayDriver::ITransact";
|
||||
next DRIVER unless $driver && $driver->className eq "WebGUI::Shop::PayDriver::ITransact";
|
||||
my $properties = $driver->get();
|
||||
##And only ones that don't already have a template set
|
||||
next DRIVER if $properties->{credentialsTemplateId};
|
||||
|
|
|
|||
|
|
@ -54,7 +54,8 @@ sub fixPayDriverLabels {
|
|||
print "\tGet rid of the duplicate label properties in the PayDrivers... " unless $quiet;
|
||||
my $pay = WebGUI::Shop::Pay->new($session);
|
||||
my $gateways = $pay->getPaymentGateways;
|
||||
foreach my $gateway (@{ $gateways }) {
|
||||
GATEWAY: foreach my $gateway (@{ $gateways }) {
|
||||
next GATEWAY unless $gateway;
|
||||
my $gatewayId = $gateway->getId;
|
||||
my $jsonLabel = $gateway->get('label');
|
||||
next if $jsonLabel;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue