diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt
index 036ae9d88..16816467a 100644
--- a/docs/changelog/6.x.x.txt
+++ b/docs/changelog/6.x.x.txt
@@ -19,6 +19,39 @@
- Fixed bugs in correctly setting default values in forms with anonymous arrays.
+6.5.6
+ - Fixed a bunch of mostly cosmetic issues with the commerce system.
+ - Fixed a bug in the navigation system that would cause it not to work in
+ operations using the user style.
+ - fix [ 1171109 ] crumbtrail showing
+ - fix [ 1176383 ] Commerce for International customers
+ - fix [ 1175400 ] Shortcut.pm - refers to WebGUI::metadata
+ - fix [ 1172769 ] htmlform.pm template -> manage button
+ - fix [ 1173970 ] Redirects in trash still function
+ - fix [ 1173720 ] recursive encrypt content doesn't work
+ - fix [ 1176573 ] runHourly.pl - DeleteExpiredEvents
+ - fix [ 1175455 ] posts can be viewed by users who are not in groupIdView
+ - fix [ 1182381 ] Package deployed to self infinitely recurses
+ - fix [ 1177456 ] metadata fields do not show up in getEditForms for any
+ asset
+ - fix [ 1182302 ] getAssetAdderLinks gets prototypes that are deleted.
+ - fix [ 1182285 ] "bold" when highlighted - really messy
+ - fix [ 1177536 ] redundancy - thread.pm 6.5.5 line 559
+ - fix [ 1177336 ] DatabaseLink::whatIsUsing is out of date
+ - fix [ 1177450 ] Layout's view method does not exclude subclasses of Layouts
+ - fix [ 1176724 ] edit existing database link - wrong username/password
+ - fix [ 1176663 ] fixUrl needs to remove slashes from end of URLs
+ - fix [ 1173560 ] copyList doesn't copyList
+ - fix [ 1183014 ] deletion of post does not update lastPostId for CS
+ - fix [ 1185507 ] gotcha.txt SetPerlVar , uploadAccessHandler wrong
+ - fix [ 1185279 ] IE/SSL "Admin mode" prompts for download of port 80
+ material
+ - Fixed a bug in navigation where ancestors would become checked whenever
+ self was also checked.
+ - fix [ 1181266 ] Navigation - relative to root fails at third level
+ - fix [ 1173779 ] editSave metadata property doesn't save type
+
+
6.5.5
- fix [ 1171569 ] add/edit sql report help link has wrong namespace
- Fixed a bug in the collaboration system that caused replies to fail.
diff --git a/docs/gotcha.txt b/docs/gotcha.txt
index d45914cfc..cc58cfe54 100644
--- a/docs/gotcha.txt
+++ b/docs/gotcha.txt
@@ -35,6 +35,16 @@ save you many hours of grief.
http://log4perl.sourceforge.net/releases/Log-Log4perl/docs/html/Log/Log4perl/Config.html
+6.5.6
+--------------------------------------------------------------------
+ * The uploadsAccessHandler.perl script has specific issues with
+ various versions of mod_perl and Perl CGI due to the many recent
+ changes in mod_perl and Perl CGI. For this reason it may not work
+ on your platform. We're working to make a script that will work
+ everywhere. Until then, using the latest versions of mod_perl and
+ Perl CGI should produce working results.
+
+
6.5.0
--------------------------------------------------------------------
* The International Macro must be enabled in all WebGUI configuration
@@ -119,12 +129,12 @@ save you many hours of grief.
before sending them to the browser. To enable this you must use
these directives:
- SetPerlVar WebguiRoot /data/WebGUI
- PerlRequire /data/WebGUI/sbin/uploadAccessHandler.perl
+ PerlSetVar WebguiRoot /data/WebGUI
+ PerlRequire /data/WebGUI/sbin/uploadsAccessHandler.perl
And then add this to each virtual host you wish to protect:
- PerlSetEnv WebguiConfig www.example.com.conf
+ PerlSetVar WebguiConfig www.example.com.conf
'. + WebGUI::International::get('Add new field','Asset'). + '
' + ); + } return $tabform; } @@ -1287,7 +1315,7 @@ sub getLineage { if (exists $rules->{excludeClasses}) { # deal with exclusions my @set; foreach my $className (@{$rules->{excludeClasses}}) { - push(@set,"asset.className <> ".quote($className)); + push(@set,"asset.className not like ".quote($className.'%')); } $where .= ' and ('.join(" and ",@set).')'; } @@ -2352,7 +2380,7 @@ sub www_copy { Copies to clipboard assets in a list, then returns self calling method www_manageAssets(), if canEdit. Otherwise returns AdminConsole rendered insufficient privilege. -cut +=cut sub www_copyList { my $self = shift; @@ -2478,7 +2506,6 @@ Deletes a MetaDataField and returns www_manageMetaData on self, if user isInGrou sub www_deleteMetaDataField { my $self = shift; - my $ac = WebGUI::AdminConsole->new("content profiling"); return WebGUI::Privilege::insufficient() unless (WebGUI::Grouping::isInGroup(4)); $self->deleteMetaDataField($session{form}{fid}); return $self->www_manageMetaData; @@ -2513,7 +2540,8 @@ sub www_deployPackage { my $packageMasterAssetId = $session{form}{assetId}; if (defined $packageMasterAssetId) { my $packageMasterAsset = WebGUI::Asset->newByDynamicClass($packageMasterAssetId); - if (defined $packageMasterAsset && $packageMasterAsset->canView) { + my $masterLineage = $packageMasterAsset->get("lineage"); + if (defined $packageMasterAsset && $packageMasterAsset->canView && $self->get("lineage") !~ /^$masterLineage/) { my $deployedTreeMaster = $self->duplicateTree($packageMasterAsset); $deployedTreeMaster->update({isPackage=>0}); } diff --git a/lib/WebGUI/Asset/Post.pm b/lib/WebGUI/Asset/Post.pm index 67d96e408..534d8390e 100644 --- a/lib/WebGUI/Asset/Post.pm +++ b/lib/WebGUI/Asset/Post.pm @@ -59,15 +59,16 @@ Returns a boolean indicating whether the user can view the current post. sub canView { my $self = shift; - if ($self->get("status") eq "approved" || $self->get("status") eq "archived") { - return 1; - } elsif ($self->get("status") eq "denied" && $self->canEdit) { - return 1; - } else { - return $self->SUPER::canView; - } + if (($self->get("status") eq "approved" || $self->get("status") eq "archived") && $self->getThread->getParent->canView) { + return 1; + } elsif ($self->get("status") eq "denied" && $self->canEdit) { + return 1; + } else { + $self->getThread->getParent->canEdit; + } } + #------------------------------------------------------------------- =head2 chopTitle ( ) @@ -429,7 +430,6 @@ sub getTemplateVars { }); } } - $self->getThread->getParent->appendTemplateLabels(\%var); return \%var; } @@ -608,6 +608,7 @@ sub notifySubscribers { my $u = WebGUI::User->new($userId); if ($lang{$u->profileField("language")}{message} eq "") { $lang{$u->profileField("language")}{var} = $self->getTemplateVars($lang{$u->profileField("language")}{var}); + $self->getThread->getParent->appendTemplateLabels($lang{$u->profileField("language")}{var}); $lang{$u->profileField("language")}{var}{url} = WebGUI::URL::getSiteURL().$self->getUrl; $lang{$u->profileField("language")}{var}{'notify.subscription.message'} = WebGUI::International::get(875,"Asset_Post",$u->profileField("language")); @@ -708,6 +709,30 @@ sub rate { } } +#------------------------------------------------------------------- + +=head2 setLastPost ( id, date ) + +Sets the last reply of this thread. + +=head3 id + +The assetId of the most recent post. + +=head3 date + +The date of the most recent post. + +=cut + +sub setLastPost { + my $self = shift; + my $id = shift; + my $date = shift; + $self->update(lastPostId=>$id, lastPostDate=>$date); + $self->getParent->setLastPost($id,$date); +} + #------------------------------------------------------------------- @@ -778,6 +803,25 @@ sub setStatusPending { } +#------------------------------------------------------------------- + +=head2 trash + +Moves post to the trash and decrements reply counter on thread. + +=cut + +sub trash { + my $self = shift; + $self->SUPER::trash; + $self->getThread->decrementReplies if ($self->isReply); + if ($self->getThread->get("lastPostId") eq $self->getId) { + my $threadLineage = $self->getThread->get("lineage"); + my ($id, $date) = WebGUI::SQL->quickArray("select assetId, dateSubmitted from Post where lineage like ".quote($threadLineage.'%')." and assetId<>".quote($self->getId)." order by dateSubmitted desc"); + $self->getThread->setLastPost($id,$date); + } +} + #------------------------------------------------------------------- =head2 unmarkRead ( ) diff --git a/lib/WebGUI/Asset/Post/Thread.pm b/lib/WebGUI/Asset/Post/Thread.pm index 4ba1c9d84..809156341 100644 --- a/lib/WebGUI/Asset/Post/Thread.pm +++ b/lib/WebGUI/Asset/Post/Thread.pm @@ -509,6 +509,27 @@ sub subscribe { WebGUI::Grouping::addUsersToGroups([$session{user}{userId}],[$self->get("subscriptionGroupId")]); } +#------------------------------------------------------------------- + +=head2 trash + +Moves thread to the trash and decrements reply counter on thread. + +=cut + +sub trash { + my $self = shift; + $self->SUPER::trash; + $self->getParent->decrementThreads; + if ($self->getParent->get("lastPostId") eq $self->getId) { + my $parentLineage = $self->getThread->get("lineage"); + my ($id, $date) = WebGUI::SQL->quickArray("select assetId, dateSubmitted from Post where lineage like ".quote($parentLineage.'%')." and assetId<>".quote($self->getId)." order by dateSubmitted desc"); + $self->getParent->setLastPost($id,$date); + } + +} + + #------------------------------------------------------------------- =head2 unlock ( ) diff --git a/lib/WebGUI/Asset/Wobject/Collaboration.pm b/lib/WebGUI/Asset/Wobject/Collaboration.pm index dae4d0b1b..7c61df4ab 100644 --- a/lib/WebGUI/Asset/Wobject/Collaboration.pm +++ b/lib/WebGUI/Asset/Wobject/Collaboration.pm @@ -755,6 +755,29 @@ sub recalculateRating { } +#------------------------------------------------------------------- + +=head2 setLastPost ( id, date ) + +Sets the most recent post in this collaboration system. + +=head3 id + +The assetId of the most recent post. + +=head3 date + +The date of the most recent post. + +=cut + +sub setLastPost { + my $self = shift; + my $id = shift; + my $date = shift; + $self->update(lastPostId=>$id, lastPostDate=>$date); +} + #------------------------------------------------------------------- =head2 subscribe ( ) diff --git a/lib/WebGUI/Asset/Wobject/Layout.pm b/lib/WebGUI/Asset/Wobject/Layout.pm index 00b933e32..36787f173 100644 --- a/lib/WebGUI/Asset/Wobject/Layout.pm +++ b/lib/WebGUI/Asset/Wobject/Layout.pm @@ -181,7 +181,7 @@ sub view { WebGUI::Style::setLink($session{config}{extrasURL}."/draggable.css",{ type=>"text/css", rel=>"stylesheet", media=>"all" }); $vars{"dragger.icon"} = WebGUI::Icon::dragIcon(); $vars{"dragger.init"} = ' - + diff --git a/lib/WebGUI/Asset/Wobject/Navigation.pm b/lib/WebGUI/Asset/Wobject/Navigation.pm index 37f3ea2a7..41f5b9bdc 100644 --- a/lib/WebGUI/Asset/Wobject/Navigation.pm +++ b/lib/WebGUI/Asset/Wobject/Navigation.pm @@ -85,7 +85,7 @@ sub getEditForm { name=>"returnUrl", value=>$session{form}{returnUrl} }); - my ($descendantsChecked, $selfChecked, $pedigreeChecked, $siblingsChecked); + my ($descendantsChecked, $ancestorsChecked, $selfChecked, $pedigreeChecked, $siblingsChecked); my @assetsToInclude = split("\n",$self->getValue("assetsToInclude")); my $afterScript; foreach my $item (@assetsToInclude) { @@ -94,6 +94,8 @@ sub getEditForm { } elsif ($item eq "descendants") { $descendantsChecked = 1; $afterScript = "displayNavEndPoint = false;"; + } elsif ($item eq "ancestors") { + $ancestorsChecked = 1; } elsif ($item eq "siblings") { $siblingsChecked = 1; } elsif ($item eq "pedigree") { @@ -118,7 +120,7 @@ sub getEditForm { $tabform->getTab("properties")->readOnly( -label=>"Relatives to Include", -value=>WebGUI::Form::checkbox({ - checked=>$selfChecked, + checked=>$ancestorsChecked, name=>"assetsToInclude", value=>"ancestors" }).'Ancestors'; - foreach my $using (WebGUI::DatabaseLink::whatIsUsing($session{form}{dlid})) { - if ($using->{title}) { - $output .= '