a bugfix for sql report and a few more updates to the form system

This commit is contained in:
JT Smith 2005-07-27 18:38:41 +00:00
parent 4eaf8c3827
commit ce6ee697f9
5 changed files with 29 additions and 513 deletions

View file

@ -104,101 +104,6 @@ sub filterContent {
}
#-------------------------------------------------------------------
=head2 float ( name )
Returns a floating point (decimal) number. Defaults to "0.0".
=head3 name
The name of the form variable to retrieve.
=cut
sub float {
if ($session{form}{$_[0]} =~ /^[\d\.\-]+$/) {
return $session{form}{$_[0]};
}
return 0.0;
}
#-------------------------------------------------------------------
=head2 group ( name )
Returns a group Id. Defaults to 2 (registered users).
=head3 name
The name of the form variable to retrieve.
=cut
sub group {
my $value = selectList($_[0]);
if (defined $value) {
return $value;
}
return 2;
}
#-------------------------------------------------------------------
=head2 hiddenList ( name )
Returns an array or a carriage return ("\n") separated scalar depending upon whether you're returning the values into an array or a scalar.
=head3 name
The name of the form variable to retrieve.
=cut
sub hiddenList {
return selectList($_[0]);
}
#-------------------------------------------------------------------
=head2 integer ( name )
Returns an integer. Defaults to "0".
=head3 name
The name of the form variable to retrieve.
=cut
sub integer {
if ($session{form}{$_[0]} =~ /^[\d\-]+$/) {
return $session{form}{$_[0]};
}
return 0;
}
#-------------------------------------------------------------------
=head2 interval ( name )
Returns an interval in seconds. Defaults to "0".
=head3 name
The name of the form variable to retrieve.
=cut
sub interval {
my $val = WebGUI::DateTime::intervalToSeconds($session{form}{$_[0]."_interval"},$session{form}{$_[0]."_units"}) || 0;
return $val;
}
#-------------------------------------------------------------------