fixed backwards compatibility with new form control API
This commit is contained in:
parent
2763dfee25
commit
f8141d46f6
2 changed files with 17 additions and 9 deletions
|
|
@ -9,6 +9,9 @@
|
|||
- fixed: Calendar now uses the correct method to get the current user's time-zone
|
||||
- Shortcut ##userPref:<profile field>## macros now work even if Shortcut is not
|
||||
under a Dashboard
|
||||
- fixed backwards compatibility with new form control API additions: getValue is now
|
||||
an alias to getValueFromForm instead of vice-versa. getValue is still the preferred
|
||||
method, getValueFromForm is still the deprecated method.
|
||||
|
||||
7.5.17
|
||||
- fixed: Payment Methods Hover Help Incomplete
|
||||
|
|
|
|||
|
|
@ -400,14 +400,13 @@ An optional value to process, instead of POST input.
|
|||
|
||||
=cut
|
||||
|
||||
# Note: This method calls getValueFromPost to maintain backwards compatibility.
|
||||
# getValueFromPost is deprecated, use getValue
|
||||
sub getValue {
|
||||
my ($self, $value) = @_;
|
||||
return $value if (defined $value);
|
||||
if ($self->session->request) {
|
||||
$value = $self->session->form->param($self->get("name"));
|
||||
return $value if (defined $value);
|
||||
}
|
||||
return $self->getDefaultValue;
|
||||
my $self = shift;
|
||||
my $value = shift;
|
||||
return $value if defined $value;
|
||||
return $self->getValueFromPost;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -447,9 +446,15 @@ Depricated. See getValue().
|
|||
|
||||
=cut
|
||||
|
||||
# Note: This method does the actual work of getValue for backwards compatibility
|
||||
# getValueFromPost is deprecated, use getValue
|
||||
sub getValueFromPost {
|
||||
my $self = shift;
|
||||
return $self->getValue(@_);
|
||||
my $self = shift;
|
||||
if ($self->session->request) {
|
||||
my $value = $self->session->form->param($self->get("name"));
|
||||
return $value if (defined $value);
|
||||
}
|
||||
return $self->getDefaultValue;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue