rework how validParent works, and where it is checked. Add an explicit check for it in addChild, and remove a bunch of overridden addChild methods.
This commit is contained in:
parent
a8496c4d15
commit
88ec09d279
12 changed files with 78 additions and 110 deletions
|
|
@ -975,7 +975,7 @@ sub updateThreadRating {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 validParent
|
||||
=head2 valid_parent_classes
|
||||
|
||||
Make sure that the current session asset is a CS for pasting and adding checks.
|
||||
|
||||
|
|
@ -983,10 +983,8 @@ This is a class method.
|
|||
|
||||
=cut
|
||||
|
||||
sub validParent {
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
return $session->asset->isa('WebGUI::Asset::Wobject::Collaboration');
|
||||
sub valid_parent_classes {
|
||||
return [qw/WebGUI::Asset::Wobject::Collaboration/];
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue