Allow template diagnostics to work when a session asset is not set. Add a way to get the raw, encoded URL from the request object.
This commit is contained in:
parent
358bc1557a
commit
4c31d182f8
3 changed files with 24 additions and 2 deletions
|
|
@ -687,14 +687,18 @@ sub process {
|
|||
|
||||
if ($self->get('state') =~ /^trash/) {
|
||||
my $i18n = WebGUI::International->new($session, 'Asset_Template');
|
||||
my $url = $session->asset ? $session->asset->get('url') ##Called via asset
|
||||
: $session->url->getRaw(); ##Called via operation, like auth
|
||||
$session->errorHandler->warn('process called on template in trash: '.$self->getId
|
||||
.'. The template was called through this url: '.$session->asset->get('url'));
|
||||
.". The template was called through this url: $url");
|
||||
return $session->var->isAdminOn ? $i18n->get('template in trash') : '';
|
||||
}
|
||||
elsif ($self->get('state') =~ /^clipboard/) {
|
||||
my $i18n = WebGUI::International->new($session, 'Asset_Template');
|
||||
my $url = $session->asset ? $session->asset->get('url')
|
||||
: $session->url->getRaw();
|
||||
$session->errorHandler->warn('process called on template in clipboard: '.$self->getId
|
||||
.'. The template was called through this url: '.$session->asset->get('url'));
|
||||
.". The template was called through this url: $url");
|
||||
return $session->var->isAdminOn ? $i18n->get('template in clipboard') : '';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue