migrate to getLineageIterator to save memory
This commit is contained in:
parent
cc87552a22
commit
2c75ab27e6
34 changed files with 794 additions and 187 deletions
|
|
@ -288,7 +288,15 @@ sub view {
|
|||
|
||||
# get other shelves
|
||||
my @childShelves = ();
|
||||
SHELF: foreach my $child (@{$self->getLineage(['children'],{returnObjects=>1,includeOnlyClasses=>['WebGUI::Asset::Wobject::Shelf']})}) {
|
||||
my $childIter = $self->getLineageIterator(['children'],{includeOnlyClasses=>['WebGUI::Asset::Wobject::Shelf']});
|
||||
SHELF: while ( 1 ) {
|
||||
my $child;
|
||||
eval { $child = $childIter->() };
|
||||
if ( my $x = WebGUI::Error->caught('WebGUI::Error::ObjectNotFound') ) {
|
||||
$session->log->error($x->full_message);
|
||||
next;
|
||||
}
|
||||
last unless $child;
|
||||
next SHELF unless $child->canView;
|
||||
my $properties = $child->get;
|
||||
$properties->{url} = $child->getUrl;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue