cleaning up
This commit is contained in:
parent
c596ea3f1a
commit
936cd1a7ef
1 changed files with 3 additions and 2 deletions
|
|
@ -23,11 +23,12 @@ sub process {
|
||||||
my $children = $asset->getLineage(["children"]);
|
my $children = $asset->getLineage(["children"]);
|
||||||
#randomize;
|
#randomize;
|
||||||
srand;
|
srand;
|
||||||
my $randomAssetId = $children->[rand(scalar(@{$children}))];
|
WebGUI::ErrorHandler::warn(rand(scalar(@{$children})));
|
||||||
|
my $randomAssetId = $children->[$index1];
|
||||||
my $randomAsset = WebGUI::Asset->newByDynamicClass($randomAssetId);
|
my $randomAsset = WebGUI::Asset->newByDynamicClass($randomAssetId);
|
||||||
if (defined $randomAsset) {
|
if (defined $randomAsset) {
|
||||||
$randomAsset->toggleToolbar;
|
$randomAsset->toggleToolbar;
|
||||||
return $randomAsset->canView ? $randomAsset->view : undef;
|
return $randomAsset->canView ? $randomAsset->view() : undef;
|
||||||
} else {
|
} else {
|
||||||
return "Asset has no children.";
|
return "Asset has no children.";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue