Merge branch 'master' of git@github.com:plainblack/webgui

This commit is contained in:
daviddelikat 2009-11-04 09:42:35 -06:00
commit aab3a74026
43 changed files with 2335 additions and 519 deletions

View file

@ -1,4 +1,13 @@
7.8.4
- Fixed a compatibility problem between WRE and new Spectre code.
- fixed #11198: Typo in i18n
- fixed #11202: USPS driver does not log authentication errors
- fixed #10985: Survey: can't add multiple choice answer
- fixed #11197: Survey Edit Console is not i18n'ed
7.8.3
- Rewrote Spectre's workflow queues to prevent it from "forgetting" about some workflows.
- fixed: RSS feeds generated with incorrect link for channel
- Fixed an error being thrown by the CalendarUpdateFeeds workflow activity.
- The auto add to group and auto delete from group operations that are used with the GroupAdd and GroupDelete macros were fixed to make the user log in if they aren't already.
- fixed #11074: Links to CS posts not working
@ -31,6 +40,13 @@
- fixed #10984: Edit Survey Screen isn't right in demo
- added: getTopKeywords method to Keywords API
- added: print remaining tickets feature to EMS
- fixed #11188: Incoherence in Navigation edit form
- fixed #11189: Controls variable missing in image asset in AssetProxy
- fixed #11190: event tmpl_var in help but not available
- fixed #11194: Event Asset Recurrence form is not i18n'ed
- fixed #11192: newByLineage tries to instantiate asset even if no assetId found
- fixed #11195: Shop, sometimes free checkout does not work
- added: UPS Shipping Driver
7.8.2
- Added scheduled vendor payout workflow activity. (Special thanks to Martin @ Oqapi)

File diff suppressed because one or more lines are too long

View file

@ -7,6 +7,11 @@ upgrading from one version to the next, or even between multiple
versions. Be sure to heed the warnings contained herein as they will
save you many hours of grief.
7.8.3
--------------------------------------------------------------------
* WebGUI now requires Locales::Country 0.05 or higher to use
the UPS shipping driver.
7.8.2
--------------------------------------------------------------------
* WebGUI now requires Business::PayPal::API 0.62 or higher.

File diff suppressed because one or more lines are too long

View file

@ -41,6 +41,7 @@ addPickLanguageMacro($session);
installSetLanguage($session);
i18nAbleToBeFriend($session);
addEMSEnhancements($session);
installUPSDriver($session);
finish($session); # this line required
@ -55,6 +56,16 @@ sub addEMSEnhancements {
print "Done.\n" unless $quiet;
}
#----------------------------------------------------------------------------
sub installUPSDriver {
my $session = shift;
print "\tAdding UPS Shipping Driver... " unless $quiet;
$session->config->addToArray('shippingDrivers', 'WebGUI::Shop::ShipDriver::UPS');
print "Done.\n" unless $quiet;
}
#----------------------------------------------------------------------------
sub i18nAbleToBeFriend {
my $session = shift;
@ -131,6 +142,7 @@ sub addPickLanguageMacro {
print "Done.\n" unless $quiet;
}
#------------------------------------------------------------------------
sub installSetLanguage {
my $session = shift;
print "\tAdding SetLanguage content handler... " unless $quiet;

View file

@ -0,0 +1,139 @@
#!/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;
my $toVersion = '7.8.4';
my $quiet; # this line required
my $session = start(); # this line required
# upgrade functions go here
dropSkipNotification($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 dropSkipNotification {
my $session = shift;
print "\tRemoving duplicate skipNotification field from the Subscribable aspect... " unless $quiet;
$session->db->write('alter table assetAspect_Subscribable drop column skipNotification');
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 = eval { WebGUI::Asset->getImportNode($session)->importPackage( $storage, { overwriteLatest => 1 } ); };
if ($package eq 'corrupt') {
die "Corrupt package found in $file. Stopping upgrade.\n";
}
if ($@ || !defined $package) {
die "Error during package import on $file: $@\nStopping upgrade\n.";
}
# 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',".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