we don't always have an asset, so use the page url instead
This commit is contained in:
parent
1e5859b09c
commit
3151a029de
1 changed files with 4 additions and 4 deletions
|
|
@ -44,7 +44,7 @@ sub process {
|
||||||
my ($session, $identifier, $type) = @_;
|
my ($session, $identifier, $type) = @_;
|
||||||
if (!$identifier) {
|
if (!$identifier) {
|
||||||
$session->errorHandler->warn('AssetProxy macro called without an asset to proxy. '
|
$session->errorHandler->warn('AssetProxy macro called without an asset to proxy. '
|
||||||
. 'The macro was called through this url: '.$session->asset->get('url'));
|
. 'The macro was called through this url: '.$session->url->page);
|
||||||
if ($session->var->isAdminOn) {
|
if ($session->var->isAdminOn) {
|
||||||
my $i18n = WebGUI::International->new($session, 'Macro_AssetProxy');
|
my $i18n = WebGUI::International->new($session, 'Macro_AssetProxy');
|
||||||
return $i18n->get('invalid url');
|
return $i18n->get('invalid url');
|
||||||
|
|
@ -61,7 +61,7 @@ sub process {
|
||||||
}
|
}
|
||||||
if (!defined $asset) {
|
if (!defined $asset) {
|
||||||
$session->errorHandler->warn('AssetProxy macro called invalid asset: '.$identifier
|
$session->errorHandler->warn('AssetProxy macro called invalid asset: '.$identifier
|
||||||
.'. The macro was called through this url: '.$session->asset->get('url'));
|
.'. The macro was called through this url: '.$session->url->page);
|
||||||
if ($session->var->isAdminOn) {
|
if ($session->var->isAdminOn) {
|
||||||
my $i18n = WebGUI::International->new($session, 'Macro_AssetProxy');
|
my $i18n = WebGUI::International->new($session, 'Macro_AssetProxy');
|
||||||
return $i18n->get('invalid url');
|
return $i18n->get('invalid url');
|
||||||
|
|
@ -69,7 +69,7 @@ sub process {
|
||||||
}
|
}
|
||||||
elsif ($asset->get('state') =~ /^trash/) {
|
elsif ($asset->get('state') =~ /^trash/) {
|
||||||
$session->errorHandler->warn('AssetProxy macro called on asset in trash: '.$identifier
|
$session->errorHandler->warn('AssetProxy macro called on asset in trash: '.$identifier
|
||||||
.'. The macro was called through this url: '.$session->asset->get('url'));
|
.'. The macro was called through this url: '.$session->url->page);
|
||||||
if ($session->var->isAdminOn) {
|
if ($session->var->isAdminOn) {
|
||||||
my $i18n = WebGUI::International->new($session, 'Macro_AssetProxy');
|
my $i18n = WebGUI::International->new($session, 'Macro_AssetProxy');
|
||||||
return $i18n->get('asset in trash');
|
return $i18n->get('asset in trash');
|
||||||
|
|
@ -77,7 +77,7 @@ sub process {
|
||||||
}
|
}
|
||||||
elsif ($asset->get('state') =~ /^clipboard/) {
|
elsif ($asset->get('state') =~ /^clipboard/) {
|
||||||
$session->errorHandler->warn('AssetProxy macro called on asset in clipboard: '.$identifier
|
$session->errorHandler->warn('AssetProxy macro called on asset in clipboard: '.$identifier
|
||||||
.'. The macro was called through this url: '.$session->asset->get('url'));
|
.'. The macro was called through this url: '.$session->url->page);
|
||||||
if ($session->var->isAdminOn) {
|
if ($session->var->isAdminOn) {
|
||||||
my $i18n = WebGUI::International->new($session, 'Macro_AssetProxy');
|
my $i18n = WebGUI::International->new($session, 'Macro_AssetProxy');
|
||||||
return $i18n->get('asset in clipboard');
|
return $i18n->get('asset in clipboard');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue