Do not prevent Assets from being added as children by subclassing addChild. It doesn't prevent paste from working. Fixes bug #11525.

This commit is contained in:
Colin Kuskie 2010-04-19 09:07:53 -07:00
parent d26a3dc862
commit b4f7bb4334
6 changed files with 2 additions and 112 deletions

View file

@ -62,26 +62,6 @@ sub _visitorCacheOk {
&& !$self->session->form->process('sortBy'));
}
#-------------------------------------------------------------------
=head2 addChild
Extend the base method to allow only Threads as children.
=cut
sub addChild {
my $self = shift;
my $properties = shift;
my @other = @_;
if ($properties->{className} ne "WebGUI::Asset::Post::Thread") {
$self->session->errorHandler->security("add a ".$properties->{className}." to a ".$self->get("className"));
return undef;
}
return $self->next::method($properties, @other);
}
#-------------------------------------------------------------------
=head2 appendPostListTemplateVars ($var, $p)