more merging of versioning and workflow
This commit is contained in:
parent
cba26ecc0c
commit
81fc744a8b
8 changed files with 45 additions and 37 deletions
|
|
@ -150,11 +150,13 @@ sub page {
|
|||
my $session = shift;
|
||||
my $assetUrl = shift;
|
||||
my $output = processOperations($session);
|
||||
$session->errorHandler->warn("a");
|
||||
if ($output eq "") {
|
||||
my $asset = eval{WebGUI::Asset->newByUrl($session,$assetUrl,$session->form->process("revision"))};
|
||||
if ($@) {
|
||||
$session->errorHandler->warn("Couldn't instantiate asset for url: ".$session->url->getRequestedUrl." Root cause: ".$@);
|
||||
}
|
||||
$session->errorHandler->warn("d");
|
||||
if (defined $asset) {
|
||||
my $method = "view";
|
||||
if ($session->form->process("func")) {
|
||||
|
|
@ -164,10 +166,13 @@ sub page {
|
|||
$method = "view";
|
||||
}
|
||||
}
|
||||
$session->errorHandler->warn("e");
|
||||
$output = tryAssetMethod($session,$asset,$method);
|
||||
$session->errorHandler->warn("f");
|
||||
$output = tryAssetMethod($session,$asset,"view") unless ($output || ($method eq "view"));
|
||||
}
|
||||
}
|
||||
$session->errorHandler->warn("b");
|
||||
if (defined($output) and $output eq "") {
|
||||
$session->http->setStatus("404","Page Not Found");
|
||||
my $notFound = WebGUI::Asset->getNotFound($session);
|
||||
|
|
@ -179,6 +184,7 @@ sub page {
|
|||
}
|
||||
$output = "An error was encountered while processing your request." if $output eq '';
|
||||
}
|
||||
$session->errorHandler->warn("c");
|
||||
if ($session->errorHandler->canShowDebug()) {
|
||||
$output .= $session->errorHandler->showDebug();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue