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
|
|
@ -345,34 +345,6 @@ sub definition {
|
|||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=head2 addChild ( properties, [...] )
|
||||
|
||||
Add a child to this asset. See C<WebGUI::AssetLineage> for more info.
|
||||
|
||||
Overridden to ensure that only GalleryAlbums are added to Galleries.
|
||||
|
||||
=cut
|
||||
|
||||
sub addChild {
|
||||
my $self = shift;
|
||||
my $properties = shift;
|
||||
my $albumClass = "WebGUI::Asset::Wobject::GalleryAlbum";
|
||||
|
||||
# Load the class
|
||||
WebGUI::Pluggable::load( $properties->{className} );
|
||||
|
||||
if ( !$properties->{className}->isa( $albumClass ) ) {
|
||||
$self->session->errorHandler->security(
|
||||
"add a ".$properties->{className}." to a ".$self->get("className")
|
||||
);
|
||||
return undef;
|
||||
}
|
||||
|
||||
return $self->next::method( $properties, @_ );
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=head2 appendTemplateVarsSearchForm ( var )
|
||||
|
||||
Appends the template vars for the search form to the hash reference C<var>.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue