- Fixed a template variable rewriting problem with Template Toolkit.
This commit is contained in:
parent
034496f260
commit
7bb998c6ee
2 changed files with 19 additions and 15 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
7.3.7
|
7.3.7
|
||||||
|
- Fixed a template variable rewriting problem with Template Toolkit.
|
||||||
|
|
||||||
7.3.6
|
7.3.6
|
||||||
- fix: Checkbox is no longer available when creating custom profile fields
|
- fix: Checkbox is no longer available when creating custom profile fields
|
||||||
|
|
@ -6,7 +7,9 @@
|
||||||
- fix: CS email message shows up as an attachment
|
- fix: CS email message shows up as an attachment
|
||||||
- fix: Calendar: start/end date time off in edit interface (perlDreamer Consulting, LLC)
|
- fix: Calendar: start/end date time off in edit interface (perlDreamer Consulting, LLC)
|
||||||
- Added a database optimization that will improve asset lookup performance by
|
- Added a database optimization that will improve asset lookup performance by
|
||||||
as much as 600% on some sites.
|
as much as 600% on some sites and another small one that will improve a different
|
||||||
|
kind of lookup by more than 10%.
|
||||||
|
|
||||||
- fix: Extra cruft in the Zip Archive template.
|
- fix: Extra cruft in the Zip Archive template.
|
||||||
- fix: fixed corner case in WebGUI::Operation::Workflow.pm which could cause the edit page to not load and display an error if an activity is undefined or cannot be defined.
|
- fix: fixed corner case in WebGUI::Operation::Workflow.pm which could cause the edit page to not load and display an error if an activity is undefined or cannot be defined.
|
||||||
- fix: testEnvironment.pl do not tests all modules (perlDreamer Consulting, LLC)
|
- fix: testEnvironment.pl do not tests all modules (perlDreamer Consulting, LLC)
|
||||||
|
|
|
||||||
|
|
@ -20,21 +20,22 @@ use Template;
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
sub _rewriteVars { # replace dots with underscrores in keys (except in keys that aren't usable as variables (URLs etc.))
|
sub _rewriteVars { # replace dots with underscrores in keys (except in keys that aren't usable as variables (URLs etc.))
|
||||||
my $vars = shift;
|
my $vars = shift;
|
||||||
foreach my $key (keys %$vars){
|
my $newVars = {};
|
||||||
my $newKey = $key;
|
foreach my $key (keys %$vars){
|
||||||
$newKey =~ s/\./_/g if $newKey !~ /\//;
|
my $newKey = $key;
|
||||||
if(ref $vars->{$key} eq 'HASH'){
|
$newKey =~ s/\./_/g if $newKey !~ /\//;
|
||||||
$vars->{$newKey} = _rewriteVars($vars->{$key});
|
if ( ref $vars->{$key} eq 'ARRAY') {
|
||||||
delete $vars->{$key} if($key ne $newKey);
|
foreach my $entry (@{$vars->{$key}}) {
|
||||||
}else{
|
push(@{$newVars->{$newKey}}, _rewriteVars($entry));
|
||||||
if($key ne $newKey){
|
|
||||||
$vars->{$newKey} = $vars->{$key};
|
|
||||||
delete $vars->{$key};
|
|
||||||
}
|
}
|
||||||
}
|
} elsif(ref $vars->{$key} eq 'HASH') {
|
||||||
}
|
$newVars->{$newKey} = _rewriteVars($vars->{$key});
|
||||||
return $vars;
|
} else {
|
||||||
|
$newVars->{$newKey} = $vars->{$key};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $newVars;
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue