Merge up to 10305
This commit is contained in:
parent
fa2e5c2c90
commit
1edaca4ed2
65 changed files with 1300 additions and 477 deletions
|
|
@ -1,7 +1,23 @@
|
|||
7.7.4
|
||||
- fixed #9989: thing-search template won't include data-save params in the url for pagination
|
||||
- fixed #10122: fixed date object to not change the value in 'toHtml' function.
|
||||
- fixed #9764: drag drop now uses the handle for 'pickup' rather than the whole object.
|
||||
- Default Survey Question bundles now store full answer information in json. Everything configured in an answer will be saved in a default configuration.
|
||||
- Survey [[question variable]] now returns the shown answer text for multiple choice questions, and the recorded value for non-multiple choice questions.
|
||||
- fixed #10142: Matrix 2.0 - Search screen compare button not functional
|
||||
- fixed #10141: Matrix 2.0 - Search does not check matching products
|
||||
- fixed #10077: after matrix sort can't return to alphanumeric sort
|
||||
- fixed #10138: Matrix 2.0 Links in Product Listing are broken
|
||||
|
||||
7.7.3
|
||||
- fixed #10094: double explanation in thread help
|
||||
- rfe #9612: Carousel Wobject (was Widget Wobject) (SDH Consulting Group)
|
||||
- Survey summaries now added. In the Survey edit, select quiz mode, and a summary will be shown to the user at the end of the survey.
|
||||
- fixed #10110: Matrix 2.0 - "Data Error" on Pending Product Listing Updates
|
||||
- rfe #9965: matrix/pls reverse dropped event variables
|
||||
- fixed install of Passive Analytics settings for new sites (SDH Consulting Group)
|
||||
- Survey Expression Engine upgraded (SDH Consulting Group)
|
||||
|
||||
7.7.2
|
||||
- fixed #10056: YUI javascripts included while adminOff (BNC)
|
||||
- fixed a bug that required you to hit "update cart" before the checkout
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
BIN
docs/upgrades/packages-7.7.3/matrix-default-view-template.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.3/matrix-default-view-template.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.
BIN
docs/upgrades/packages-7.7.3/survey.css.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.3/survey.css.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.7.4/default_page.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.4/default_page.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.7.4/matrix-default-view-template.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.4/matrix-default-view-template.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.7.4/matrix-search-template.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.4/matrix-search-template.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.7.4/new-matrix_matrix.css.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.4/new-matrix_matrix.css.wgpkg
Normal file
Binary file not shown.
Binary file not shown.
|
|
@ -23,7 +23,8 @@ use WebGUI::Session;
|
|||
use WebGUI::Storage;
|
||||
use WebGUI::Asset;
|
||||
use WebGUI::Utility;
|
||||
|
||||
use WebGUI::PassiveAnalytics::Rule;
|
||||
use WebGUI::Utility;
|
||||
|
||||
my $toVersion = '7.7.3';
|
||||
my $quiet; # this line required
|
||||
|
|
@ -35,11 +36,8 @@ my $session = start(); # this line required
|
|||
|
||||
addSurveyQuizModeColumns($session);
|
||||
addSurveyExpressionEngineConfigFlag($session);
|
||||
|
||||
# Story Manager
|
||||
installStoryManagerTables($session);
|
||||
sm_upgradeConfigFiles($session);
|
||||
sm_updateDailyWorkflow($session);
|
||||
addCarouselWobject($session);
|
||||
reInstallPassiveAnalyticsConfig($session);
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
|
@ -53,6 +51,22 @@ finish($session); # this line required
|
|||
# print "DONE!\n" unless $quiet;
|
||||
#}
|
||||
|
||||
sub addCarouselWobject{
|
||||
my $session = shift;
|
||||
print "\tAdding Carousel wobject... " unless $quiet;
|
||||
$session->db->write("create table Carousel (
|
||||
assetId char(22) binary not null,
|
||||
revisionDate bigint not null,
|
||||
items mediumtext,
|
||||
templateId char(22),
|
||||
primary key (assetId, revisionDate)
|
||||
)");
|
||||
my $assets = $session->config->get( "assets" );
|
||||
$assets->{ "WebGUI::Asset::Wobject::Carousel" } = { category => "utilities" };
|
||||
$session->config->set( "assets", $assets );
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
sub addSurveyQuizModeColumns{
|
||||
my $session = shift;
|
||||
print "\tAdding columns to Survey table... " unless $quiet;
|
||||
|
|
@ -68,97 +82,52 @@ sub addSurveyExpressionEngineConfigFlag{
|
|||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
sub installStoryManagerTables {
|
||||
my ($session) = @_;
|
||||
print "\tAdding Story Manager tables... " unless $quiet;
|
||||
my $db = $session->db;
|
||||
$db->write(<<EOSTORY);
|
||||
CREATE TABLE Story (
|
||||
assetId CHAR(22) BINARY NOT NULL,
|
||||
revisionDate BIGINT NOT NULL,
|
||||
headline CHAR(255),
|
||||
subtitle CHAR(255),
|
||||
byline CHAR(255),
|
||||
location CHAR(255),
|
||||
highlights TEXT,
|
||||
story MEDIUMTEXT,
|
||||
photo LONGTEXT,
|
||||
PRIMARY KEY ( assetId, revisionDate )
|
||||
)
|
||||
EOSTORY
|
||||
|
||||
$db->write(<<EOARCHIVE);
|
||||
CREATE TABLE StoryArchive (
|
||||
assetId CHAR(22) BINARY NOT NULL,
|
||||
revisionDate BIGINT NOT NULL,
|
||||
storiesPerPage INTEGER,
|
||||
groupToPost CHAR(22) BINARY,
|
||||
templateId CHAR(22) BINARY,
|
||||
storyTemplateId CHAR(22) BINARY,
|
||||
editStoryTemplateId CHAR(22) BINARY,
|
||||
archiveAfter INT(11),
|
||||
richEditorId CHAR(22) BINARY,
|
||||
approvalWorkflowId CHAR(22) BINARY DEFAULT 'pbworkflow000000000003',
|
||||
PRIMARY KEY ( assetId, revisionDate )
|
||||
)
|
||||
EOARCHIVE
|
||||
|
||||
$db->write(<<EOTOPIC);
|
||||
CREATE TABLE StoryTopic (
|
||||
assetId CHAR(22) BINARY NOT NULL,
|
||||
revisionDate BIGINT NOT NULL,
|
||||
storiesPer INTEGER,
|
||||
storiesShort INTEGER,
|
||||
templateId CHAR(22) BINARY,
|
||||
storyTemplateId CHAR(22) BINARY,
|
||||
PRIMARY KEY ( assetId, revisionDate )
|
||||
)
|
||||
EOTOPIC
|
||||
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
sub sm_upgradeConfigFiles {
|
||||
my ($session) = @_;
|
||||
print "\tAdding Story Manager to config file... " unless $quiet;
|
||||
my $config = $session->config;
|
||||
$config->addToHash(
|
||||
'assets',
|
||||
'WebGUI::Asset::Wobject::StoryTopic' => {
|
||||
'category' => 'community'
|
||||
},
|
||||
);
|
||||
$config->addToHash(
|
||||
'assets',
|
||||
"WebGUI::Asset::Wobject::StoryArchive" => {
|
||||
"isContainer" => 1,
|
||||
"category" => "community"
|
||||
},
|
||||
);
|
||||
my $activities = $config->get('workflowActivities');
|
||||
my $none = $activities->{None};
|
||||
if (!isIn('WebGUI::Workflow::Activity::ArchiveOldStories', @{ $none })) {
|
||||
unshift @{ $none }, 'WebGUI::Workflow::Activity::ArchiveOldStories';
|
||||
#----------------------------------------------------------------------------
|
||||
# Conditionally re-add passive analytics config because it wasn't added to WebGUI.conf.original
|
||||
# in version 7.7.0.
|
||||
sub reInstallPassiveAnalyticsConfig {
|
||||
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);
|
||||
}
|
||||
$config->set('workflowActivities', $activities);
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
sub sm_updateDailyWorkflow {
|
||||
my ($session) = @_;
|
||||
print "\tAdding Archive Old Stories to Daily Workflow... " unless $quiet;
|
||||
my $workflow = WebGUI::Workflow->new($session, 'pbworkflow000000000001');
|
||||
foreach my $activity (@{ $workflow->getActivities }) {
|
||||
return if $activity->getName() eq 'WebGUI::Workflow::Activity::ArchiveOldStories';
|
||||
# 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);
|
||||
}
|
||||
my $activity = $workflow->addActivity('WebGUI::Workflow::Activity::ArchiveOldStories');
|
||||
$activity->set('title', 'Archive Old Stories');
|
||||
$activity->set('description', 'Archive old stories, based on the settings of the Story Archives that own them');
|
||||
# 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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
|
|||
280
docs/upgrades/upgrade_7.7.3-7.7.4.pl
Normal file
280
docs/upgrades/upgrade_7.7.3-7.7.4.pl
Normal file
|
|
@ -0,0 +1,280 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
our ($webguiRoot);
|
||||
|
||||
BEGIN {
|
||||
$webguiRoot = "../..";
|
||||
unshift (@INC, $webguiRoot."/lib");
|
||||
}
|
||||
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Storage;
|
||||
use WebGUI::Asset;
|
||||
use WebGUI::Utility;
|
||||
use JSON;
|
||||
|
||||
my $toVersion = '7.7.4';
|
||||
my $quiet; # this line required
|
||||
|
||||
|
||||
my $session = start(); # this line required
|
||||
|
||||
# upgrade functions go here
|
||||
updateSurveyQuestionTypes($session);
|
||||
|
||||
# Story Manager
|
||||
installStoryManagerTables($session);
|
||||
sm_upgradeConfigFiles($session);
|
||||
sm_updateDailyWorkflow($session);
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Describe what our function does
|
||||
#sub exampleFunction {
|
||||
# my $session = shift;
|
||||
# print "\tWe're doing some stuff here that you should know about... " unless $quiet;
|
||||
# # and here's our code
|
||||
# print "DONE!\n" unless $quiet;
|
||||
#}
|
||||
sub updateSurveyQuestionTypes{
|
||||
my $session = shift;
|
||||
my $refs = $session->db->buildArrayRefOfHashRefs("SELECT * FROM Survey_questionTypes");
|
||||
for my $ref(@$refs){
|
||||
my $name = $ref->{questionType};
|
||||
my $params;
|
||||
my @texts = split/,/,$ref->{answers};
|
||||
#next if(@texts == 0);
|
||||
my $count = 0;
|
||||
for my $text(@texts){
|
||||
my $verbatim = 0;
|
||||
$verbatim = 1 if($text =~ /verbatim/);
|
||||
push(@$params,[$text,$count++,$verbatim]);
|
||||
}
|
||||
_loadValues($name,$params,$session);
|
||||
}
|
||||
}
|
||||
|
||||
sub _loadValues{
|
||||
my $name = shift;
|
||||
my $values = shift;
|
||||
my $session = shift;
|
||||
my $answers = [];
|
||||
for my $value(@$values){
|
||||
my $answer = _getAnswer();
|
||||
$answer->{text} = $value->[0];
|
||||
$answer->{recordedAnswer} = $value->[1];
|
||||
$answer->{verbatim} = $value->[2];
|
||||
push @$answers,$answer;
|
||||
}
|
||||
my $json = to_json($answers);
|
||||
$session->db->write("UPDATE Survey_questionTypes SET answers = ? WHERE questionType = ?",[$json,$name]);
|
||||
}
|
||||
|
||||
sub _getAnswer{
|
||||
my $answer = {
|
||||
text => q{},
|
||||
verbatim => 0,
|
||||
textCols => 10,
|
||||
textRows => 5,
|
||||
goto => q{},
|
||||
gotoExpression => q{},
|
||||
recordedAnswer => q{},
|
||||
isCorrect => 1,
|
||||
min => 1,
|
||||
max => 10,
|
||||
step => 1,
|
||||
value => 1,
|
||||
terminal => 0,
|
||||
terminalUrl => q{},
|
||||
type => 'answer'
|
||||
};
|
||||
return $answer;
|
||||
}
|
||||
|
||||
sub installStoryManagerTables {
|
||||
my ($session) = @_;
|
||||
print "\tAdding Story Manager tables... " unless $quiet;
|
||||
my $db = $session->db;
|
||||
$db->write(<<EOSTORY);
|
||||
CREATE TABLE Story (
|
||||
assetId CHAR(22) BINARY NOT NULL,
|
||||
revisionDate BIGINT NOT NULL,
|
||||
headline CHAR(255),
|
||||
subtitle CHAR(255),
|
||||
byline CHAR(255),
|
||||
location CHAR(255),
|
||||
highlights TEXT,
|
||||
story MEDIUMTEXT,
|
||||
photo LONGTEXT,
|
||||
PRIMARY KEY ( assetId, revisionDate )
|
||||
)
|
||||
EOSTORY
|
||||
|
||||
$db->write(<<EOARCHIVE);
|
||||
CREATE TABLE StoryArchive (
|
||||
assetId CHAR(22) BINARY NOT NULL,
|
||||
revisionDate BIGINT NOT NULL,
|
||||
storiesPerPage INTEGER,
|
||||
groupToPost CHAR(22) BINARY,
|
||||
templateId CHAR(22) BINARY,
|
||||
storyTemplateId CHAR(22) BINARY,
|
||||
editStoryTemplateId CHAR(22) BINARY,
|
||||
archiveAfter INT(11),
|
||||
richEditorId CHAR(22) BINARY,
|
||||
approvalWorkflowId CHAR(22) BINARY DEFAULT 'pbworkflow000000000003',
|
||||
PRIMARY KEY ( assetId, revisionDate )
|
||||
)
|
||||
EOARCHIVE
|
||||
|
||||
$db->write(<<EOTOPIC);
|
||||
CREATE TABLE StoryTopic (
|
||||
assetId CHAR(22) BINARY NOT NULL,
|
||||
revisionDate BIGINT NOT NULL,
|
||||
storiesPer INTEGER,
|
||||
storiesShort INTEGER,
|
||||
templateId CHAR(22) BINARY,
|
||||
storyTemplateId CHAR(22) BINARY,
|
||||
PRIMARY KEY ( assetId, revisionDate )
|
||||
)
|
||||
EOTOPIC
|
||||
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
sub sm_upgradeConfigFiles {
|
||||
my ($session) = @_;
|
||||
print "\tAdding Story Manager to config file... " unless $quiet;
|
||||
my $config = $session->config;
|
||||
$config->addToHash(
|
||||
'assets',
|
||||
'WebGUI::Asset::Wobject::StoryTopic' => {
|
||||
'category' => 'community'
|
||||
},
|
||||
);
|
||||
$config->addToHash(
|
||||
'assets',
|
||||
"WebGUI::Asset::Wobject::StoryArchive" => {
|
||||
"isContainer" => 1,
|
||||
"category" => "community"
|
||||
},
|
||||
);
|
||||
my $activities = $config->get('workflowActivities');
|
||||
my $none = $activities->{None};
|
||||
if (!isIn('WebGUI::Workflow::Activity::ArchiveOldStories', @{ $none })) {
|
||||
unshift @{ $none }, 'WebGUI::Workflow::Activity::ArchiveOldStories';
|
||||
}
|
||||
$config->set('workflowActivities', $activities);
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
sub sm_updateDailyWorkflow {
|
||||
my ($session) = @_;
|
||||
print "\tAdding Archive Old Stories to Daily Workflow... " unless $quiet;
|
||||
my $workflow = WebGUI::Workflow->new($session, 'pbworkflow000000000001');
|
||||
foreach my $activity (@{ $workflow->getActivities }) {
|
||||
return if $activity->getName() eq 'WebGUI::Workflow::Activity::ArchiveOldStories';
|
||||
}
|
||||
my $activity = $workflow->addActivity('WebGUI::Workflow::Activity::ArchiveOldStories');
|
||||
$activity->set('title', 'Archive Old Stories');
|
||||
$activity->set('description', 'Archive old stories, based on the settings of the Story Archives that own them');
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Add a package to the import node
|
||||
sub addPackage {
|
||||
my $session = shift;
|
||||
my $file = shift;
|
||||
|
||||
# Make a storage location for the package
|
||||
my $storage = WebGUI::Storage->createTemp( $session );
|
||||
$storage->addFileFromFilesystem( $file );
|
||||
|
||||
# Import the package into the import node
|
||||
my $package = WebGUI::Asset->getImportNode($session)->importPackage( $storage );
|
||||
|
||||
# Turn off the package flag, and set the default flag for templates added
|
||||
my $assetIds = $package->getLineage( ['self','descendants'] );
|
||||
for my $assetId ( @{ $assetIds } ) {
|
||||
my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetId );
|
||||
if ( !$asset ) {
|
||||
print "Couldn't instantiate asset with ID '$assetId'. Please check package '$file' for corruption.\n";
|
||||
next;
|
||||
}
|
||||
my $properties = { isPackage => 0 };
|
||||
if ($asset->isa('WebGUI::Asset::Template')) {
|
||||
$properties->{isDefault} = 1;
|
||||
}
|
||||
$asset->update( $properties );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
sub start {
|
||||
my $configFile;
|
||||
$|=1; #disable output buffering
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile,
|
||||
'quiet'=>\$quiet
|
||||
);
|
||||
my $session = WebGUI::Session->open($webguiRoot,$configFile);
|
||||
$session->user({userId=>3});
|
||||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
$versionTag->set({name=>"Upgrade to ".$toVersion});
|
||||
return $session;
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
sub finish {
|
||||
my $session = shift;
|
||||
updateTemplates($session);
|
||||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
$versionTag->commit;
|
||||
$session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".$session->datetime->time().")");
|
||||
$session->close();
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
sub updateTemplates {
|
||||
my $session = shift;
|
||||
return undef unless (-d "packages-".$toVersion);
|
||||
print "\tUpdating packages.\n" unless ($quiet);
|
||||
opendir(DIR,"packages-".$toVersion);
|
||||
my @files = readdir(DIR);
|
||||
closedir(DIR);
|
||||
my $newFolder = undef;
|
||||
foreach my $file (@files) {
|
||||
next unless ($file =~ /\.wgpkg$/);
|
||||
# Fix the filename to include a path
|
||||
$file = "packages-" . $toVersion . "/" . $file;
|
||||
addPackage( $session, $file );
|
||||
}
|
||||
}
|
||||
|
||||
#vim:ft=perl
|
||||
Loading…
Add table
Add a link
Reference in a new issue