Test adding children, along with automatically adding folders.

This commit is contained in:
Colin Kuskie 2009-03-03 00:36:12 +00:00
parent 02dc71055b
commit bd59ac6006
2 changed files with 16 additions and 3 deletions

View file

@ -34,8 +34,11 @@ sub addChild {
my $self = shift;
my ($properties) = @_;
##Allow subclassing
return undef unless $properties->{className} =~ /^WebGUI::Asset::Story::/;
return $self->SUPER::addChild(@_);
return undef unless $properties->{className} =~ /^WebGUI::Asset::Story/;
my $todayFolder = $self->getFolder;
return undef unless $todayFolder;
my $story = $todayFolder->addChild(@_);
return $story;
}
#-------------------------------------------------------------------