Set the default state of the created object to "published".

This commit is contained in:
Colin Kuskie 2010-04-20 12:14:28 -07:00
parent 94fff8d6fb
commit 3b6c4e8372

View file

@ -89,6 +89,7 @@ sub addChild {
$session->db->commit;
$properties->{assetId} = $id;
$properties->{parentId} = $self->getId;
$properties->{state} = 'published';
my $temp = WebGUI::Asset->newByPropertyHashRef($session, $properties) || croak "Couldn't create a new $properties->{className} asset!";
my $newAsset = $temp->addRevision($properties, $now, $options);
$self->updateHistory("added child ".$id);