Commit 9781fe75 authored by Frank Bergmann's avatar Frank Bergmann

- fixed the "float" plugin-filter for ad_page_contract

parent c71eefeb
......@@ -1808,6 +1808,12 @@ ad_page_contract_filter float { name value } {
@author Steven Pulito (stevenp@seas.upenn.edu)
@creation-date 22 August 2000
} {
# Check if the first character is a "+" or "-"
set signum ""
if {[regexp {^([\+\-])(.*)} $value match signum rest]} {
set value $rest
}
# remove the first decimal point, the theory being that
# at this point a valid float will pass an integer test
regsub {\.} $value "" value_to_be_tested
......@@ -1822,6 +1828,10 @@ ad_page_contract_filter float { name value } {
# but not all of the zeros
set value "0"
}
# finally add the signum character again
set value "$signum$value"
return 1
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment