more bug fixes
This commit is contained in:
parent
fa680c215d
commit
09abb2d440
3 changed files with 21 additions and 11 deletions
|
|
@ -87,7 +87,7 @@ sub page {
|
|||
$method = "www_".$method;
|
||||
$output = eval{$asset->$method()};
|
||||
if ($@) {
|
||||
WebGUI::ErrorHandler::fatalError("Couldn't call method ".$method." on asset for ".$asset->get("url")." (".$asset->getId."). Root cause: ".$@);
|
||||
WebGUI::ErrorHandler::fatalError("Couldn't call method ".$method." on asset for ".$session{env}{PATH_INFO}." Root cause: ".$@);
|
||||
} else {
|
||||
if ($output eq "" && $method ne "view") {
|
||||
$output = $asset->www_view;
|
||||
|
|
|
|||
|
|
@ -1703,7 +1703,9 @@ sub newByUrl {
|
|||
my $asset;
|
||||
if ($url ne "") {
|
||||
$asset = WebGUI::SQL->quickHashRef("select assetId, className from asset where url=".quote($url));
|
||||
return WebGUI::Asset->newByDynamicClass($asset->{assetId}, $asset->{className});
|
||||
if ($asset->{assetId} ne "" || $asset->{className} ne "") {
|
||||
return WebGUI::Asset->newByDynamicClass($asset->{assetId}, $asset->{className});
|
||||
}
|
||||
}
|
||||
return $class->newByDynamicClass($session{setting}{defaultPage});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue