Let paste also index the descendants of the asset to be pasted.

This commit is contained in:
Martin Kamerbeek 2007-05-02 14:19:26 +00:00
parent 68fa0161c5
commit 52911b42d5

View file

@ -160,9 +160,13 @@ sub paste {
if ($self->getId eq $pastedAsset->get("parentId") || $pastedAsset->setParent($self)) {
$pastedAsset->publish(['clipboard','clipboard-limbo']); # Paste only clipboard items
$pastedAsset->updateHistory("pasted to parent ".$self->getId);
# Update lineage in search index.
$pastedAsset->indexContent();
my $updateAssets = $pastedAsset->getLineage(['self', 'descendants'], {returnObjects => 1});
foreach (@{$updateAssets}) {
$_->indexContent();
}
return 1;
}