finished migrating article, fixed some bugs, and enhanced the file asset api

This commit is contained in:
JT Smith 2005-01-02 01:32:54 +00:00
parent ad755e0e78
commit f8ca6ec5bd
8 changed files with 82 additions and 265 deletions

View file

@ -20,7 +20,7 @@ sub process {
my ($url) = WebGUI::Macro::getParams(shift);
my $asset = WebGUI::Asset->newByUrl($url);
if (defined $asset) {
my $children = $asset->getLineage(["descendants"],{endingLineageLength=>$asset->getLineageLength+1});
my $children = $asset->getLineage(["children"]);
randomize;
my $randomAssetId = $children->[rand(scalar(@{$children})];
my $randomAsset = WebGUI::Asset->newByDynamicClass($randomAssetId);