should speed up most template processing where there is more than 1 form variable.
This commit is contained in:
parent
8657769993
commit
8aa438fa67
1 changed files with 9 additions and 3 deletions
|
|
@ -26,7 +26,7 @@ Appends session variables to the variable list.
|
|||
|
||||
=head3 vars
|
||||
|
||||
A reference the template variable hash.
|
||||
A reference to the template variable hash.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -41,8 +41,14 @@ sub addSessionVars {
|
|||
$vars->{"session.var.adminOn"} = $self->session->var->isAdminOn;
|
||||
$vars->{"session.setting.companyName"} = $self->session->setting->get("companyName");
|
||||
$vars->{"session.setting.anonymousRegistration"} = $self->session->setting->get("anonymousRegistration");
|
||||
foreach my $field ($self->session->form->param) {
|
||||
$vars->{"session.form.".$field} = $self->session->form->param($field);
|
||||
my $forms = $self->session->form->paramsHashRef();
|
||||
foreach my $field (keys %$forms) {
|
||||
if $forms->{$field} {
|
||||
$vars->{"session.form.".$field} =
|
||||
(ref($forms->{$field}) eq 'ARRAY')
|
||||
?$forms->{$field}[$forms->{$field}[-1]]
|
||||
:$forms->{$field};
|
||||
}
|
||||
}
|
||||
$vars->{"webgui.version"} = $WebGUI::VERSION;
|
||||
$vars->{"webgui.status"} = $WebGUI::STATUS;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue