Skip to content
Permalink
Browse files

Merge commit 'v7.10.23' into WebGUI8. Tests need fixing.

  • Loading branch information...
perlDreamer committed Nov 2, 2011
2 parents 3b9f7ae + d84dd42 commit a2a821822d87863f47f80460e39eff224b968959
Showing with 578 additions and 132 deletions.
  1. +16 −1 docs/changelog/7.x.x.txt
  2. +6 −0 docs/gotcha.txt
  3. +1 −1 docs/legal.txt
  4. BIN docs/upgrades/packages-7.10.23/shopping-cart-collateral-items_my-purchases-default.wgpkg
  5. BIN docs/upgrades/packages-7.10.23/stockdatatmpl000000001.wgpkg
  6. +141 −0 docs/upgrades/upgrade_7.10.22-7.10.23.pl
  7. +1 −0 etc/WebGUI.conf.original
  8. +23 −8 lib/WebGUI/Asset.pm
  9. +2 −2 lib/WebGUI/Asset/Template.pm
  10. +15 −0 lib/WebGUI/Asset/Wobject.pm
  11. +2 −3 lib/WebGUI/Asset/Wobject/AssetReport.pm
  12. +1 −1 lib/WebGUI/Asset/Wobject/Collaboration.pm
  13. +15 −1 lib/WebGUI/Asset/Wobject/Layout.pm
  14. +3 −3 lib/WebGUI/Asset/Wobject/Thingy.pm
  15. +1 −2 lib/WebGUI/AssetMetaData.pm
  16. +21 −13 lib/WebGUI/Auth.pm
  17. +24 −9 lib/WebGUI/Group.pm
  18. +1 −1 lib/WebGUI/Session/Url.pm
  19. +10 −5 lib/WebGUI/Shop/Cart.pm
  20. +10 −13 lib/WebGUI/User.pm
  21. +7 −1 lib/WebGUI/Workflow/Activity/ExtendCalendarRecurrences.pm
  22. +1 −1 lib/WebGUI/Workflow/Activity/NotifyAboutVersionTag.pm
  23. +6 −0 lib/WebGUI/i18n/English/Account.pm
  24. +2 −1 sbin/testEnvironment.pl
  25. +1 −1 sbin/userImport.pl
  26. +6 −6 share/create.sql
  27. 0 share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/addAssetEditTemplate.pl
  28. 0 share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/addI18nMacroAlias.pl
  29. 0 share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/addMaintenancePageToConfig.pl
  30. 0 share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/addNewAdminConsole.pl
  31. 0 share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/addTemplateToolkit.pl
  32. BIN share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/admin_console.wgpkg
  33. BIN share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/admin_progress_bar.wgpkg
  34. BIN share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/default_page.wgpkg
  35. BIN share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/documentation_free-documentation.wgpkg
  36. 0 share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/facebook_auth.sql
  37. 0 share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/migrateToNewCache.pl
  38. 0 share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/moveFileLocations.pl
  39. 0 share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/moveMaintenance.pl
  40. 0 share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/moveRequiredProfileFields.pl
  41. BIN share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/one_over_three.wgpkg
  42. BIN share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/one_over_two.wgpkg
  43. BIN share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/pbtmplblankstyle000001.wgpkg
  44. BIN share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/plainblacknews.wgpkg
  45. 0 share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/removeAdminBar.pl
  46. 0 share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/removeFilePile.pl
  47. 0 share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/removeMobileUserAgents.pl
  48. 0 share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/removeURLHandlers.pl
  49. BIN share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/right_column.wgpkg
  50. BIN share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/root_import_adminconsole_admin-interface.wgpkg
  51. BIN share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/root_import_adminconsole_edit-asset.wgpkg
  52. BIN share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/root_import_default-asset-subscription.wgpkg
  53. BIN share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/root_import_default-facebook-choose-username.wgpkg
  54. BIN share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/root_import_richedit.wgpkg
  55. BIN share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/side_by_side.wgpkg
  56. BIN share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/style-underground.wgpkg
  57. BIN share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/three-columns.wgpkg
  58. 0 share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/zzz_renameAccountMacroTemplateVariables.pl
  59. 0 share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/zzz_renameAdminToggleMacroTemplateVariables.pl
  60. 0 share/upgrades/{7.10.22-8.0.0 → 7.10.23-8.0.0}/zzz_renameFormBuilderTemplateVars.pl
  61. +0 −3 t/Asset/Post.t
  62. +23 −1 t/Asset/Wobject/Layout.t
  63. +4 −4 t/Asset/Wobject/Thingy/indexing.t
  64. +6 −5 t/Auth/LDAP.t
  65. +13 −1 t/Auth/mech.t
  66. +16 −31 t/Group.t
  67. +34 −12 t/Group/group_scratch.t
  68. +101 −0 t/Group/ldap_groups.t
  69. +4 −2 t/LDAPLink.t
  70. +1 −0 t/SQL.t
  71. +2 −0 t/Workflow/Activity/WaitForUserConfirmation.t
  72. +58 −0 t/templateAttachments.t
@@ -1,5 +1,20 @@
7.10.23
- fixed #12225: Stock asset, multiple instances on a page
- fixed #12229: Indexed thingy data has gateway url prepended to it
- fixed #12195: Visitor group by scratch membership shared among all Visitors (Dale Trexel)
- fixed #12227: Corrected AssetReport such that OrderBy works correctly.
- fixed #12238: Old template attachement in search template slows down sites
- fixed #12239: Still get cart error message after removing extra recurring items from the cart
- fixed #12240: Empty Extend Calendar Recurrance version tags
- fixed #12241: Account Shop
- fixed #12246: Layout inherits mobileStyleTemplateId and mobileTemplateId from parent Layouts
- fixed #12246: added extra_www_add_properties as properties fix-up hook in child for www_add
- fixed #12231: Thingy reindex fails on upgrade
- fixed #12245: Encrypt Login and Display Message on Login conflict
- fixed #12211: Recurring Item error message in Cart

7.10.22
- rfe #12223: Add dateTime type to content profiling (metadata)
- rfe #12223: Add date 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
@@ -31,6 +31,12 @@ save you many hours of grief.
Account Macro template
Admin Toggle Macro template

7.10.23
--------------------------------------------------------------------
* The default_search2 template had a bad template attachment pointing to
an old WebGUI CSS Snippet called /webgui.css. Any attachment with that
URL will be removed from ALL templates in the Search namespace.

7.10.21
--------------------------------------------------------------------
* WebGUI now depends on Kwargs.
@@ -2,7 +2,7 @@
# WebGUI Legal Information #
####################################################################

WebGUI is Copyright 2001-2009 Plain Black Corporation. All rights
WebGUI is Copyright 2001-2011 Plain Black Corporation. All rights
reserved.

WebGUI Content Engine, WebGUI Runtime Environment, and Plain Black
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,141 @@
#!/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.23';
my $quiet; # this line required


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

# upgrade functions go here
fixBadTemplateAttachments($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 fixBadTemplateAttachments {
my $session = shift;
print "\tRemove template attachements in search templates that refer to an old, deleted CSS snippet... " unless $quiet;
# and here's our code
use WebGUI::Asset::Template;
my $get_template = WebGUI::Asset::Template->getIsa($session);
TEMPLATE: while (1) {
my $template = eval {$get_template->()};
next TEMPLATE if Exception::Class->caught;
last TEMPLATE unless $template;
next TEMPLATE unless $template->get('namespace') eq 'Search';
$template->removeAttachments(['^/(webgui.css);']);
}
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
@@ -872,6 +872,7 @@
"r" : "r_printable",
"Spacer" : "Spacer",
"SpectreCheck" : "SpectreCheck",
"TwitterLogin" : "TwitterLogin",
"Thumbnail" : "Thumbnail",
"TwitterLogin" : "TwitterLogin",
"User" : "User",
@@ -1427,6 +1427,28 @@ sub getImportNode {
return WebGUI::Asset->newById($session, "PBasset000000000000002");
}

#-------------------------------------------------------------------

=head2 getInheritableProperties ( )
Returns a hash (list) of properties that should be inherited from a parent when creating an asset.
=cut

sub getInheritableProperties {
my $self = shift;
return (
parentId => $self->getId,
groupIdView => $self->get("groupIdView"),
groupIdEdit => $self->get("groupIdEdit"),
ownerUserId => $self->get("ownerUserId"),
encryptPage => $self->get("encryptPage"),
styleTemplateId => $self->get("styleTemplateId"),
printableStyleTemplateId => $self->get("printableStyleTemplateId"),
isHidden => $self->get("isHidden"),
);
}



#-------------------------------------------------------------------
@@ -2749,15 +2771,8 @@ sub www_add {
}
my %properties = (
%prototypeProperties,
parentId => $self->getId,
groupIdView => $self->get("groupIdView"),
groupIdEdit => $self->get("groupIdEdit"),
ownerUserId => $self->get("ownerUserId"),
encryptPage => $self->get("encryptPage"),
styleTemplateId => $self->get("styleTemplateId"),
printableStyleTemplateId => $self->get("printableStyleTemplateId"),
isHidden => $self->get("isHidden"),
className=>$class,
$self->getInheritableProperties,
assetId=>"new",
url=>scalar($self->session->form->param("url")),
);
@@ -637,15 +637,15 @@ sub prepare {

$style->setRawHeadTags($headBlock);

my %props = ( type => 'text/css', rel => 'stylesheet' );
foreach my $sheet ( @{ $self->getAttachments('stylesheet') } ) {
my %props = ( type => 'text/css', rel => 'stylesheet' );
$style->setLink($sheet->{url}, \%props);
}

my $doScripts = sub {
my ($type, $body) = @_;
my %props = ( type => 'text/javascript' );
foreach my $script ( @{ $self->getAttachments($type) } ) {
my %props = ( type => 'text/javascript' );
$style->setScript($script->{url}, \%props, $body);
}
};
@@ -226,6 +226,21 @@ sub getCollateral {
}


#-------------------------------------------------------------------

=head2 getInheritableProperties ( )
Extend the base class to include the mobileStyleTemplateId.
=cut

override getInheritableProperties => sub {
my $self = shift;
my %properties = super();
$properties{mobileStyleTemplateId} = $self->mobileStyleTemplateId;
return %properties;
};

#-------------------------------------------------------------------

=head2 getStyleTemplateId
@@ -139,9 +139,8 @@ sub getTemplateVars {
$rules->{'whereClause'} .= qq{$prop $op $value};
}

if($rules->{'whereClause'}) {
$rules->{'joinClass'} = $settings->{className};
}
# Always join to the class, asset and assetData are excluded by getLineageSql
$rules->{'joinClass'} = $settings->{className};

#Build the order by condition
my $order = $settings->{order};
@@ -1383,7 +1383,7 @@ around groupIdView => sub {
my $instance_data = {
workflowId => 'xR-_GRRbjBojgLsFx3dEMA',
className => 'WebGUI::Asset',
methodName => 'newById',
methodName => 'newPending',
parameters => $self->getId,
};
my $instance = WebGUI::Workflow::Instance->create($self->session, $instance_data);
@@ -393,6 +393,21 @@ sub getContentLastModifiedBy {

#-------------------------------------------------------------------

=head2 getInheritableProperties ( )
Extend the base class to include the mobileTemplateId.
=cut

override getInheritableProperties => sub {
my $self = shift;
my %properties = super();
$properties{mobileTemplateId} = $self->mobileTemplateId;
return %properties;
};

#-------------------------------------------------------------------

=head2 www_view
Extend the base method to handle caching and ad rotation.
@@ -437,4 +452,3 @@ override www_view => sub {

__PACKAGE__->meta->make_immutable;
1;

@@ -1056,7 +1056,7 @@ sub getFieldValue {
# TODO: The otherThing field type is probably also handled by getFormPlugin, so the elsif below can probably be
# safely removed. However, this requires more testing than I can provide right now, so for now this stays the
# way it was.
elsif ($field->{fieldType} =~ m/^otherthing/x) {
elsif ($fieldType =~ m/^otherthing/x) {
my $otherThingId = $field->{fieldType};
$otherThingId =~ s/^otherThing_//x;
my $tableName = 'Thingy_'.$otherThingId;
@@ -1603,11 +1603,11 @@ sub indexThing {
return unless $thing;
my $index = WebGUI::Search::Index->new($self);
$index->addRecord(
url => $self->getUrl($self->getThingUrl($thing)),
groupIdView => $thing->{groupIdView},
title => $thing->{label},
subId => $thing->{thingId},
keywords => join(' ', @{$thing}{qw/label editScreenTitle editInstructions searchScreenTitle searchDescription/}),
url => $self->session->url->append($self->get('url'), $self->getThingUrl($thing)),
);
##Easy update of all thingData fields for this thing. This is in lieu of deleting all records
##And rebuilding them all.
@@ -1679,7 +1679,7 @@ sub indexThingData {
|| $self->getTitle;
$index->addRecord(
assetId => $self->getId,
url => $self->getUrl('func=viewThingData;thingId='. $thing->{thingId} . ';thingDataId='. $thingData->{thingDataId}),
url => $session->url->append($self->get('url'), 'func=viewThingData;thingId='. $thing->{thingId} . ';thingDataId='. $thingData->{thingDataId}),
groupIdView => $thing->{groupIdView},
title => $title,
subId => $thing->{thingId} . '-' . $thingData->{thingDataId},
@@ -15,7 +15,6 @@ package WebGUI::Asset;
=cut

use strict;
use Tie::IxHash;

=head1 NAME
@@ -380,7 +379,7 @@ sub www_editMetaDataField {
label=>$i18n->get(486),
hoverHelp=>$i18n->get('Data Type description'),
value=>$fieldInfo->{fieldType} || "text",
types=> [ qw /text integer yesNo selectBox radioList checkList dateTime/ ]
types=> [ qw /text integer yesNo selectBox radioList checkList date/ ]
);

my $default = ref WebGUI::Asset->assetName eq 'ARRAY'
Oops, something went wrong.

0 comments on commit a2a8218

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