Index: openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl,v diff -u -r1.66.2.4 -r1.66.2.5 --- openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl 5 Sep 2019 17:00:28 -0000 1.66.2.4 +++ openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl 17 Jan 2020 15:43:04 -0000 1.66.2.5 @@ -19,14 +19,6 @@ set ::acs::useNaviServer [expr {[ns_info name] eq "NaviServer"}] } -proc number_p { str } { - return [regexp {^[-+]?[0-9]*(.[0-9]+)?$} $str] - - # Note that this will return true for empty string! - # - # TODO: Why not use Tcl's "string is double" ? -} - proc empty_string_p { query_string } { return [string equal $query_string ""] } @@ -121,7 +113,12 @@ } proc ad_proc_valid_switch_p {str} { - return [expr {[string index $str 0] eq "-" && ![number_p $str]}] + # + # Check if this looks like a switch: + # - first character is '-' + # - next character is not a number + # + return [expr {[regexp {^-[^0-9].*$} $str]}] } proc ad_proc args {