Skip to content
Permalink
Browse files

Merge commit 'v7.10.19' into WebGUI8

  • Loading branch information...
perlDreamer committed Oct 26, 2011
2 parents 9bd2d09 + 9ab05ad commit 4fea10a1f577db98d5c9b7e7634ecc21e0250fd7
Showing with 490 additions and 77 deletions.
  1. +9 −0 docs/changelog/7.x.x.txt
  2. BIN docs/upgrades/packages-7.10.19/style-underground_top-navigation.wgpkg
  3. +177 −0 docs/upgrades/upgrade_7.10.18-7.10.19.pl
  4. +152 −36 lib/WebGUI/Asset/Wobject/EventManagementSystem.pm
  5. +8 −6 lib/WebGUI/Asset/Wobject/Thingy.pm
  6. +4 −3 lib/WebGUI/AssetHelper/ExportHtml.pm
  7. +2 −0 lib/WebGUI/Help/Asset_EventManagementSystem.pm
  8. +1 −0 lib/WebGUI/Help/Asset_Thingy.pm
  9. +8 −3 lib/WebGUI/Macro/RenderThingData.pm
  10. +8 −6 lib/WebGUI/Workflow/Activity/CalendarUpdateFeeds.pm
  11. +4 −4 lib/WebGUI/i18n/English/Asset_Calendar.pm
  12. +30 −0 lib/WebGUI/i18n/English/Asset_EventManagementSystem.pm
  13. +6 −0 lib/WebGUI/i18n/English/Asset_Thingy.pm
  14. +27 −2 sbin/userImport.pl
  15. +9 −8 share/create.sql
  16. 0 share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/addAssetEditTemplate.pl
  17. 0 share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/addI18nMacroAlias.pl
  18. 0 share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/addMaintenancePageToConfig.pl
  19. 0 share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/addNewAdminConsole.pl
  20. 0 share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/addTemplateToolkit.pl
  21. BIN share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/admin_console.wgpkg
  22. BIN share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/admin_progress_bar.wgpkg
  23. BIN share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/default_page.wgpkg
  24. BIN share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/documentation_free-documentation.wgpkg
  25. 0 share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/facebook_auth.sql
  26. 0 share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/migrateToNewCache.pl
  27. 0 share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/moveFileLocations.pl
  28. 0 share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/moveMaintenance.pl
  29. 0 share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/moveRequiredProfileFields.pl
  30. BIN share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/one_over_three.wgpkg
  31. BIN share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/one_over_two.wgpkg
  32. BIN share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/pbtmplblankstyle000001.wgpkg
  33. BIN share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/plainblacknews.wgpkg
  34. 0 share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/removeAdminBar.pl
  35. 0 share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/removeFilePile.pl
  36. 0 share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/removeMobileUserAgents.pl
  37. 0 share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/removeURLHandlers.pl
  38. BIN share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/right_column.wgpkg
  39. BIN share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/root_import_adminconsole_admin-interface.wgpkg
  40. BIN share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/root_import_adminconsole_edit-asset.wgpkg
  41. BIN share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/root_import_default-asset-subscription.wgpkg
  42. BIN share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/root_import_default-facebook-choose-username.wgpkg
  43. BIN share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/root_import_richedit.wgpkg
  44. BIN share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/side_by_side.wgpkg
  45. BIN share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/style-underground.wgpkg
  46. BIN share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/three-columns.wgpkg
  47. 0 share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/zzz_renameAccountMacroTemplateVariables.pl
  48. 0 share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/zzz_renameAdminToggleMacroTemplateVariables.pl
  49. 0 share/upgrades/{7.10.18-8.0.0 → 7.10.19-8.0.0}/zzz_renameFormBuilderTemplateVars.pl
  50. +4 −1 t/Macro/RenderThingData.t
  51. +35 −4 t/Workflow/Activity/CalendarUpdateFeeds.t
  52. +6 −4 www/extras/yui-webgui/build/layout/draggable.js
@@ -1,3 +1,12 @@
7.10.19
- fixed #12169: extras uploads symlink export
- Added ability to pass caller assetId to RenderThingMacro
- Allow specific expirations for groups in userImport.pl
- fixed #12164: Calendar feeds with tons of ;adminId=XXXXXX added
- fixed #12167: Calendar Next/Prev Month/Year confusion
- fixed #12172: Underground User Style template shows up in Style wizard during site creation
- fixed #12157: www_editThingSave

7.10.18
- fixed #12138: Version tag gets create by entering and direct leaving
- Added the WebGUI::Event API
Binary file not shown.
@@ -0,0 +1,177 @@
#!/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::Asset::Wobject::Calendar;
use Exception::Class;


my $toVersion = '7.10.19';
my $quiet; # this line required


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

# upgrade functions go here
addTicketLimitToBadgeGroup( $session );
fixBrokenCalendarFeedUrls ( $session );
removeUndergroundUserStyleTemplate ( $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;
#}

#----------------------------------------------------------------------------
# Fix calendar feed urls that had adminId attached to them until they blew up
sub fixBrokenCalendarFeedUrls {
my $session = shift;
print "\tChecking all calendar feed URLs for adminId brokenness... " unless $quiet;
my $getCalendar = WebGUI::Asset::Wobject::Calendar->getIsa($session);
CALENDAR: while (1) {
my $calendar = eval { $getCalendar->(); };
next CALENDAR if Exception::Class->caught;
last CALENDAR unless $calendar;
FEED: foreach my $feed (@{ $calendar->getFeeds }) {
$feed->{url} =~ s/adminId=[^;]{22};?//g;
$feed->{url} =~ s/\?$//;
$calendar->setFeed($feed->{feedId}, $feed);
}
}
print "DONE!\n" unless $quiet;
}

#----------------------------------------------------------------------------
# Add a ticket limit to badges in a badge group
sub removeUndergroundUserStyleTemplate {
my $session = shift;
print "\tRemove Underground User Style template... " unless $quiet;
if ($session->setting->get('userFunctionStyleId') eq 'zfDnOJgeiybz9vnmoEXRXA') {
$session->setting->set('userFunctionStyleId', 'Qk24uXao2yowR6zxbVJ0xA');
}
my $underground_user = WebGUI::Asset->newByDynamicClass($session, 'zfDnOJgeiybz9vnmoEXRXA');
if ($underground_user) {
$underground_user->purge;
}
print "DONE!\n" unless $quiet;
}

#----------------------------------------------------------------------------
# Add a ticket limit to badges in a badge group
sub addTicketLimitToBadgeGroup {
my $session = shift;
print "\tAdd ticket limit to badge groups... " unless $quiet;
# Make sure it hasn't been done already...
my $columns = $session->db->buildHashRef('describe EMSBadgeGroup');
use List::MoreUtils qw(any);
if(!any { $_ eq 'ticketsPerBadge' } keys %{$columns}) {
$session->db->write(q{
ALTER TABLE EMSBadgeGroup ADD COLUMN `ticketsPerBadge` INTEGER
});
}
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 4fea10a

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