Merge commit 'v7.10.17' into 8
Conflicts: docs/upgrades/upgrade_7.9.13-7.10.0.pl lib/WebGUI.pm lib/WebGUI/Asset/Template/TemplateToolkit.pm lib/WebGUI/Asset/Wobject/AssetReport.pm lib/WebGUI/Asset/Wobject/Thingy.pm lib/WebGUI/Form/Captcha.pm lib/WebGUI/Macro/AdminBar.pm lib/WebGUI/Shop/Cart.pm lib/WebGUI/Shop/PayDriver.pm lib/WebGUI/Shop/PayDriver/PayPal/ExpressCheckout.pm lib/WebGUI/Shop/PayDriver/PayPal/PayPalStd.pm lib/WebGUI/Shop/Transaction.pm lib/WebGUI/Workflow/Instance.pm lib/WebGUI/Workflow/Spectre.pm lib/WebGUI/i18n/English/PayDriver.pm t/Asset/Asset.t t/Asset/AssetExportHtml.t t/Asset/AssetLineage.t t/Asset/Wobject/Thingy.t
This commit is contained in:
commit
795d88e7e5
69 changed files with 972 additions and 170 deletions
43
lib/WebGUI/Macro/AssetProperty.pm
Normal file
43
lib/WebGUI/Macro/AssetProperty.pm
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
package WebGUI::Macro::AssetProperty;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
WebGUI::Macro::AssetProperty
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
^AssetProperty(sf76sd8f5s7f5s7618, title);
|
||||
^AssetProperty(root/import, assetId);
|
||||
|
||||
=head2 process( $session, $url_or_assetId, $propertyName )
|
||||
|
||||
Equivalent to calling $asset->get($propertyName)
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($session, $id, $name) = @_;
|
||||
my $asset = WebGUI::Asset->new($session, $id) if $session->id->valid($id);
|
||||
$asset ||= WebGUI::Asset->newByUrl($session, $id);
|
||||
|
||||
return $asset->get($name) if $asset;
|
||||
|
||||
$session->log->error("Invalid assetId or URL in AssetProperty: $id");
|
||||
return '';
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
@ -11,8 +11,8 @@ package WebGUI::Macro::RenderThingData;
|
|||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use WebGUI::Group;
|
||||
use WebGUI::Asset::Template;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Asset::Wobject::Thingy;
|
||||
|
||||
=head1 NAME
|
||||
|
|
@ -39,6 +39,8 @@ Optional. Specifies the templateId or template url to use. If omitted, the def
|
|||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($session, $thingDataUrl, $templateHint ) = @_;
|
||||
my $i18n = WebGUI::International->new($session, 'Macro_RenderThingData');
|
||||
return $i18n->get('no template') if !$templateHint;
|
||||
|
||||
my $uri = URI->new( $thingDataUrl );
|
||||
|
||||
|
|
@ -55,7 +57,6 @@ sub process {
|
|||
my $output = $thing->www_viewThingData( $thingId, $thingDataId, $templateHint );
|
||||
|
||||
# FIX: Temporary solution (broken map due to template rendering <script> tags)
|
||||
return "RenderThingData: Please specify a template." if !$templateHint;
|
||||
return "RenderThingData: Contained bad tags!" if $output =~ /script>/;
|
||||
|
||||
return $output;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue