more conversion to the new streaming/chunking/bucketing system
This commit is contained in:
parent
46fa7e78e7
commit
6c4ae02f34
15 changed files with 219 additions and 43 deletions
|
|
@ -43,10 +43,14 @@ sub process {
|
|||
my $asset = WebGUI::Asset->newByUrl($session,$url);
|
||||
#Sorry, you cannot proxy the notfound page.
|
||||
if (defined $asset && $asset->getId ne $session->setting->get("notFoundPage")) {
|
||||
$asset->toggleToolbar;
|
||||
my $output = $asset->canView ? $asset->view : undef;
|
||||
$output .= "AssetProxy:".Time::HiRes::tv_interval($t) if ($session->errorHandler->canShowPerformanceIndicators());
|
||||
return $output;
|
||||
if ($asset->canView) {
|
||||
$asset->toggleToolbar;
|
||||
$asset->prepareView;
|
||||
my $output = $asset->view;
|
||||
$output .= "AssetProxy:".Time::HiRes::tv_interval($t) if ($session->errorHandler->canShowPerformanceIndicators());
|
||||
return $output;
|
||||
}
|
||||
return undef;
|
||||
} else {
|
||||
my $i18n = WebGUI::International->new($session, 'Macro_AssetProxy');
|
||||
return $i18n->get('invalid url');
|
||||
|
|
|
|||
|
|
@ -45,8 +45,12 @@ sub process {
|
|||
my $randomAssetId = $children->[rand(scalar(@{$children}))];
|
||||
my $randomAsset = WebGUI::Asset->newByDynamicClass($session,$randomAssetId);
|
||||
if (defined $randomAsset) {
|
||||
$randomAsset->toggleToolbar;
|
||||
return $randomAsset->canView ? $randomAsset->view() : undef;
|
||||
if ($randomAsset->canView) {
|
||||
$randomAsset->toggleToolbar;
|
||||
$randomAsset->prepareView;
|
||||
return $randomAsset->view;
|
||||
}
|
||||
return undef;
|
||||
} else {
|
||||
return $i18n->get('childless');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue