lib/nitro/server/request.rb in nitro-0.4.1 vs lib/nitro/server/request.rb in nitro-0.5.0

- old
+ new

@@ -1,17 +1,17 @@ # code: # * George Moschovitis <gm@navel.gr> # # (c) 2004 Navel, all rights reserved. -# $Id: request.rb 155 2004-11-13 20:32:12Z gmosx $ +# $Id: request.rb 167 2004-11-23 14:03:10Z gmosx $ require "cgi" require "ftools" -require "nitro/utils/string" -require "nitro/utils/uri" -require "nitro/utils/http" +require "glue/string" +require "nitro/uri" +require "nitro/http" require "nitro/server/cookie" require "nitro/server/requestpart" module N @@ -350,11 +350,11 @@ # String parameters). # def get(key, default=nil) val = @parameters[key] - if !val or (val.is_a?(String) and (not N::StringUtils.valid?(val))) + if !val or (val.is_a?(String) and (not G::StringUtils.valid?(val))) @parameters[key] = default return default elsif default.is_a?(Integer) return val.to_i else @@ -427,11 +427,11 @@ alias_method :errors_list, :errors_to_a # Check if a parameter is valid # def param?(param) - return N::StringUtils.valid?(self[param]) + return G::StringUtils.valid?(self[param]) end alias_method :action?, :param? # Check if a parameter exists! # Example: @@ -463,10 +463,10 @@ # do NOT cache the fragment. @uncacheable = true end # gmosx: to avoid using param? - if param.is_a?(String) and (not N::StringUtils.valid?(param)) + if param.is_a?(String) and (not G::StringUtils.valid?(param)) return nil else return param end end