Remove subclassed methods validParent and addChild from GalleryFile and Gallery.
This commit is contained in:
parent
ef89051084
commit
cd0fbf8ecb
2 changed files with 0 additions and 41 deletions
|
|
@ -827,19 +827,6 @@ sub valid_parent_classes {
|
|||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=head2 validParent ( )
|
||||
|
||||
Override validParent to only allow GalleryAlbums to hold GalleryFiles.
|
||||
|
||||
=cut
|
||||
|
||||
sub validParent {
|
||||
my ($class, $session) = @_;
|
||||
return $session->asset->isa('WebGUI::Asset::Wobject::GalleryAlbum');
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=head2 view ( )
|
||||
|
||||
method called by the container www_view method.
|
||||
|
|
|
|||
|
|
@ -342,34 +342,6 @@ use WebGUI::HTML;
|
|||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=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->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