lib/knj/web.rb in knjrbfw-0.0.74 vs lib/knj/web.rb in knjrbfw-0.0.75
- old
+ new
@@ -128,11 +128,11 @@
end
secname = try.to_s
end
- secname = secname.to_sym if args[:syms] and secname.is_a?(String) and !Php4r.is_numeric(secname)
+ secname = secname.to_sym if args[:syms] and secname.is_a?(String) and !(Float(secname) rescue false)
return [secname, secname_empty]
end
def self.parse_name_second(seton, varname, value, args = {})
if value.respond_to?(:filename) and value.filename
@@ -378,10 +378,10 @@
html << "</div></td>"
html << "<td#{self.style_html(css)} class=\"tdc\" id=\"#{Knj::Web.html("#{args[:id]}_content")}\"><div>"
if args[:type] == :textarea
if args.key?(:height)
- if Php4r.is_numeric(args[:height])
+ if (Float(args[:height]) rescue false)
css["height"] = "#{args[:height]}px"
else
css["height"] = args[:height]
end
end
\ No newline at end of file