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:
parent
d26a3dc862
commit
b4f7bb4334
6 changed files with 2 additions and 112 deletions
|
|
@ -298,27 +298,6 @@ sub definition {
|
|||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=head2 addChild ( properties [, more ] )
|
||||
|
||||
Only allows Events to be added as a child of this asset.
|
||||
|
||||
=cut
|
||||
|
||||
sub addChild {
|
||||
my $self = shift;
|
||||
my $properties = shift;
|
||||
my @other = @_;
|
||||
|
||||
if ($properties->{className} ne "WebGUI::Asset::Event") {
|
||||
$self->session->errorHandler->security("add a ".$properties->{className}." to a ".$self->get("className"));
|
||||
return undef;
|
||||
}
|
||||
|
||||
return $self->SUPER::addChild($properties, @other);
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=head2 addFeed ( $feedParams )
|
||||
|
||||
Adds a new Feed to this calendar. This is a wrapper around WebGUI::JSONCollateral's setJSONCollateral
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue