Merge commit 'v7.10.18' into 8
Conflicts: docs/gotcha.txt docs/previousVersion.sql docs/templates.txt lib/WebGUI.pm lib/WebGUI/Asset/File.pm lib/WebGUI/Asset/Story.pm lib/WebGUI/Asset/Wobject/Calendar.pm lib/WebGUI/Asset/Wobject/Thingy.pm lib/WebGUI/AssetExportHtml.pm lib/WebGUI/Content/AssetManager.pm lib/WebGUI/Group.pm lib/WebGUI/Macro/AssetProxy.pm lib/WebGUI/Shop/PayDriver/PayPal/PayPalStd.pm lib/WebGUI/Storage.pm t/Asset/AssetExportHtml.t t/Asset/Story.t t/Shop/TaxDriver/Generic.t t/Storage.t
This commit is contained in:
commit
0c5acb697b
75 changed files with 979 additions and 139 deletions
|
|
@ -45,7 +45,7 @@ sub process {
|
|||
my ($session, $identifier, $type) = @_;
|
||||
if (!$identifier) {
|
||||
$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->isAdminOn) {
|
||||
my $i18n = WebGUI::International->new($session, 'Macro_AssetProxy');
|
||||
return $i18n->get('invalid url');
|
||||
|
|
@ -61,9 +61,9 @@ sub process {
|
|||
else {
|
||||
$asset = eval { WebGUI::Asset->newByUrl($session,$identifier); };
|
||||
}
|
||||
if (Exception::Class->caught()) {
|
||||
$session->log->warn('AssetProxy macro called invalid asset: '.$identifier
|
||||
.'. The macro was called through this url: '.$session->asset->get('url'));
|
||||
if (!defined $asset) {
|
||||
$session->errorHandler->warn('AssetProxy macro called invalid asset: '.$identifier
|
||||
.'. The macro was called through this url: '.$session->url->page);
|
||||
if ($session->isAdminOn) {
|
||||
my $i18n = WebGUI::International->new($session, 'Macro_AssetProxy');
|
||||
return $i18n->get('invalid url');
|
||||
|
|
@ -71,15 +71,15 @@ sub process {
|
|||
}
|
||||
elsif ($asset->get('state') =~ /^trash/) {
|
||||
$session->log->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->isAdminOn) {
|
||||
my $i18n = WebGUI::International->new($session, 'Macro_AssetProxy');
|
||||
return $i18n->get('asset in trash');
|
||||
}
|
||||
}
|
||||
elsif ($asset->get('state') =~ /^clipboard/) {
|
||||
$session->log->warn('AssetProxy macro called on asset in clipboard: '.$identifier
|
||||
.'. The macro was called through this url: '.$session->asset->get('url'));
|
||||
$session->errorHandler->warn('AssetProxy macro called on asset in clipboard: '.$identifier
|
||||
.'. The macro was called through this url: '.$session->url->page);
|
||||
if ($session->isAdminOn) {
|
||||
my $i18n = WebGUI::International->new($session, 'Macro_AssetProxy');
|
||||
return $i18n->get('asset in clipboard');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue