Skip to content
Permalink
Browse files

Merge commit 'v7.10.22' into WebGUI8

  • Loading branch information...
perlDreamer committed Nov 1, 2011
2 parents 4855816 + 2886243 commit 431cd280a45f26b86db16665441c2d7a132a6f34
Showing with 3,543 additions and 313 deletions.
  1. +10 −0 docs/changelog/7.x.x.txt
  2. +5 −1 docs/templates.txt
  3. BIN docs/upgrades/packages-7.10.22/default_emsbadge.wgpkg
  4. BIN docs/upgrades/packages-7.10.22/root_import_thingy-templates_thingy.css.wgpkg
  5. BIN docs/upgrades/packages-7.10.22/shopping-cart-collateral-items.wgpkg
  6. BIN docs/upgrades/packages-7.9.34-7.10.22/merged.wgpkg
  7. +198 −0 docs/upgrades/upgrade_7.10.21-7.10.22.pl
  8. +561 −0 docs/upgrades/upgrade_7.9.34-7.10.22.pl
  9. +1 −0 etc/WebGUI.conf.original
  10. +0 −2 lib/WebGUI.pm
  11. +52 −1 lib/WebGUI/Account/Profile.pm
  12. +7 −5 lib/WebGUI/Asset/Post/Thread.pm
  13. +16 −0 lib/WebGUI/Asset/Sku.pm
  14. +80 −4 lib/WebGUI/Asset/Sku/EMSBadge.pm
  15. +40 −3 lib/WebGUI/Asset/Wobject/EventManagementSystem.pm
  16. +2 −2 lib/WebGUI/Asset/Wobject/Thingy.pm
  17. +1 −1 lib/WebGUI/AssetMetaData.pm
  18. +29 −3 lib/WebGUI/Auth.pm
  19. +20 −1 lib/WebGUI/Form/Combo.pm
  20. +2 −2 lib/WebGUI/Form/List.pm
  21. +2 −2 lib/WebGUI/Form/SelectBox.pm
  22. +5 −1 lib/WebGUI/HTML.pm
  23. +56 −7 lib/WebGUI/Operation/User.pm
  24. +9 −1 lib/WebGUI/Shop/Address.pm
  25. +160 −19 lib/WebGUI/Shop/AddressBook.pm
  26. +15 −3 lib/WebGUI/Shop/Cart.pm
  27. +240 −0 lib/WebGUI/Shop/PayDriver/CreditCard.pm
  28. +267 −0 lib/WebGUI/Shop/PayDriver/CreditCard/AuthorizeNet.pm
  29. +7 −6 lib/WebGUI/User.pm
  30. +6 −0 lib/WebGUI/i18n/English/Asset_EventManagementSystem.pm
  31. +50 −0 lib/WebGUI/i18n/English/PayDriver_AuthorizeNet.pm
  32. +161 −0 lib/WebGUI/i18n/English/PayDriver_CreditCard.pm
  33. +2 −0 sbin/testEnvironment.pl
  34. +197 −196 share/create.sql
  35. 0 share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/addAssetEditTemplate.pl
  36. 0 share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/addI18nMacroAlias.pl
  37. 0 share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/addMaintenancePageToConfig.pl
  38. 0 share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/addNewAdminConsole.pl
  39. 0 share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/addTemplateToolkit.pl
  40. BIN share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/admin_console.wgpkg
  41. BIN share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/admin_progress_bar.wgpkg
  42. BIN share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/default_page.wgpkg
  43. BIN share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/documentation_free-documentation.wgpkg
  44. 0 share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/facebook_auth.sql
  45. 0 share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/migrateToNewCache.pl
  46. 0 share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/moveFileLocations.pl
  47. 0 share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/moveMaintenance.pl
  48. 0 share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/moveRequiredProfileFields.pl
  49. BIN share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/one_over_three.wgpkg
  50. BIN share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/one_over_two.wgpkg
  51. BIN share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/pbtmplblankstyle000001.wgpkg
  52. BIN share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/plainblacknews.wgpkg
  53. 0 share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/removeAdminBar.pl
  54. 0 share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/removeFilePile.pl
  55. 0 share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/removeMobileUserAgents.pl
  56. 0 share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/removeURLHandlers.pl
  57. BIN share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/right_column.wgpkg
  58. BIN share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/root_import_adminconsole_admin-interface.wgpkg
  59. BIN share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/root_import_adminconsole_edit-asset.wgpkg
  60. BIN share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/root_import_default-asset-subscription.wgpkg
  61. BIN share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/root_import_default-facebook-choose-username.wgpkg
  62. BIN share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/root_import_richedit.wgpkg
  63. BIN share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/side_by_side.wgpkg
  64. BIN share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/style-underground.wgpkg
  65. BIN share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/three-columns.wgpkg
  66. 0 share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/zzz_renameAccountMacroTemplateVariables.pl
  67. 0 share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/zzz_renameAdminToggleMacroTemplateVariables.pl
  68. 0 share/upgrades/{7.10.21-8.0.0 → 7.10.22-8.0.0}/zzz_renameFormBuilderTemplateVars.pl
  69. +218 −0 t/Account/Profile.t
  70. +1 −1 t/Asset/Asset.t
  71. +46 −0 t/Asset/Post/Thread/bug_12206_bad_subscription_groups_in_duplicate.t
  72. +1 −0 t/Asset/Wobject/Article.t
  73. +166 −0 t/Asset/Wobject/Thingy/www_editThingDataSaveViaAjax.t
  74. +118 −3 t/Auth.t
  75. +29 −4 t/HTML.t
  76. +170 −19 t/Operation/User.t
  77. +3 −5 t/Shop/Address.t
  78. +403 −16 t/Shop/AddressBook.t
  79. +9 −5 t/Shop/Cart.t
  80. +1 −0 t/Shop/Pay.t
  81. +118 −0 www/extras/yui-webgui/build/asset/sku/emsbadge.js
  82. +59 −0 www/extras/yui-webgui/build/form/form.js
  83. BIN .../d2/5cd2d045be1d0967e47276fd6c2d3242 → 38/93/389319e91b251464dc3ccf559de5c691}/thumb-top-left.jpg
  84. BIN ...ds/{5c/d2/5cd2d045be1d0967e47276fd6c2d3242 → 38/93/389319e91b251464dc3ccf559de5c691}/top-left.jpg
  85. BIN ...ds/{08/52/0852d6c3186fd9a9e52eab8fd8d1ad77 → 3c/e1/3ce1c9490aa981a19c9228f47be0eeda}/input_bg.jpg
  86. BIN .../52/0852d6c3186fd9a9e52eab8fd8d1ad77 → 3c/e1/3ce1c9490aa981a19c9228f47be0eeda}/thumb-input_bg.jpg
  87. BIN ...c8/37c8ed37c9f44558525c0fd5c648d3e1 → 48/d9/48d94a1f46e6369767982bde8e4ff194}/thumb-top-right.jpg
  88. BIN ...s/{37/c8/37c8ed37c9f44558525c0fd5c648d3e1 → 48/d9/48d94a1f46e6369767982bde8e4ff194}/top-right.jpg
  89. BIN ...c3/43/c343e82e0cddb9ac924d05ec41d45f75 → 56/6a/566a9ad05defc721d369ccf5a230b8f5}/bottom-right.jpg
  90. BIN ...c343e82e0cddb9ac924d05ec41d45f75 → 56/6a/566a9ad05defc721d369ccf5a230b8f5}/thumb-bottom-right.jpg
  91. BIN ...{b3/0b/b30b065dfd4de937335e8bb7cd5db1cf → 7a/37/7a37d34156e8e11a579f3926cbc2ab12}/bottom-left.jpg
  92. BIN .../b30b065dfd4de937335e8bb7cd5db1cf → 7a/37/7a37d34156e8e11a579f3926cbc2ab12}/thumb-bottom-left.jpg
@@ -1,3 +1,13 @@
7.10.22
- rfe #12223: Add dateTime type to content profiling (metadata)
- rfe #12207: Thingy. Field_name info returned by www_editThingDataSaveViaAjax
- fixed #12206: Bad Subscription Groups in Duplicated Threads
- fixed #12208: replacements don't work
- fixed #12213: Unable to view cart when an asset is deleted.
- added: Better integration between User Profile fields, the Shop address book and the EMS.
- fixed #12218: Failed INSERT in Passive Profiling causes leak
- fixed #12173: CrystalX theme Thingy drop down problem

7.10.21
- added #9668 extension template variable to attachment loops for the following assets:
Article,Post,Event,File,Form::Attachments,Folder
@@ -1,7 +1,7 @@
This is a running list of template changes made during upgrades. If you have copied the default
templates, you will need to apply these changes manually to your copies.

7.8.0
8.0

* Account Macro template variables renamed:
account.url => account_url
@@ -11,6 +11,10 @@ templates, you will need to apply these changes manually to your copies.
toggle.url => toggle_url
toggle.text => toggle_text

7.10.22
* Thingy CSS file - root/import/thingy-templates/thingy.css
Add CSS to make sure that overflows are visible, to handle style that hide overflow by default.

7.10.18
* Collaboration System Default Notification Template /default_forum_notification
Replace table with divs to make inline replying easier.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,198 @@
#!/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.10.22';
my $quiet; # this line required


my $session = start(); # this line required

# upgrade functions go here
addAuthorizePaymentDriver($session);

createAddressField($session);
addLinkedProfileAddress($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;
#}

#----------------------------------------------------------------------------
# Add the Authorize.net payment driver to each config file
sub addAuthorizePaymentDriver {
my $session = shift;
print "\tAdd the Authorize.net payment driver... " unless $quiet;
# and here's our code
$session->config->addToArray('paymentDrivers', 'WebGUI::Shop::PayDriver::CreditCard::AuthorizeNet');
print "DONE!\n" unless $quiet;
}

#----------------------------------------------------------------------------
sub addLinkedProfileAddress {
my $session = shift;
print "\tAdding linked profile addresses for existing users... " unless $quiet;

my $users = $session->db->buildArrayRef( q{
select userId from users where userId not in ('1','3')
} );

foreach my $userId (@$users) {
#check to see if there is user profile information available
my $u = WebGUI::User->new($session,$userId);
#skip if user does not have any homeAddress fields filled in
next unless (
$u->profileField("homeAddress")
|| $u->profileField("homeCity")
|| $u->profileField("homeState")
|| $u->profileField("homeZip")
|| $u->profileField("homeCountry")
|| $u->profileField("homePhone")
);

#Get the address book for the user (one is created if it does not exist)
my $addressBook = WebGUI::Shop::AddressBook->newByUserId($session,$userId);

#Add the profile address for the user
$addressBook->addAddress({
label => "Profile Address",
firstName => $u->profileField("firstName"),
lastName => $u->profileField("lastName"),
address1 => $u->profileField("homeAddress"),
city => $u->profileField("homeCity"),
state => $u->profileField("homeState"),
country => $u->profileField("homeCountry"),
code => $u->profileField("homeZip"),
phoneNumber => $u->profileField("homePhone"),
email => $u->profileField("email"),
isProfile => 1,
});
}

print "DONE!\n" unless $quiet;
}

#----------------------------------------------------------------------------
sub createAddressField {
my $session = shift;

#skip if field exists
my $columns = $session->db->buildArrayRef("show columns from address where Field='isProfile'");
return if(scalar(@$columns));

print "\tAdding profile link to Address... " unless $quiet;

$session->db->write( q{
alter table address add isProfile tinyint default 0
} );

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;

print "\tUpgrading package $file\n" unless $quiet;
# 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 {
my $node = WebGUI::Asset->getImportNode($session);
$node->importPackage( $storage, {
overwriteLatest => 1,
clearPackageFlag => 1,
setDefaultTemplate => 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.";
}

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
Oops, something went wrong.

0 comments on commit 431cd28

Please sign in to comment.
You can’t perform that action at this time.