Index: openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl,v diff -u -r1.65 -r1.66 --- openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl 24 Sep 2024 11:44:02 -0000 1.65 +++ openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl 13 Nov 2024 08:43:48 -0000 1.66 @@ -952,36 +952,24 @@ set form [ns_getform] } - if { $form eq "" } { - set form_size 0 - } else { - set form_size [ns_set size $form] - } - # This is the array in which we store the signature variables as we come across them # Whenever we see a variable named foo:sig, we record it here as apc_signatures(foo). array set apc_signatures [list] - for { set form_counter_i 0 } { $form_counter_i < $form_size } { incr form_counter_i } { - + foreach {actual_name actual_value} [ns_set array $form] { # # Map actual argument to formal argument ... only complication is from arrays # - # Check the name of the argument to passed in the form, ignore if not valid - if { [regexp -nocase -- {^[a-z0-9_\-\.\:]*$} [ns_set key $form $form_counter_i] ] } { - set actual_name [ns_set key $form $form_counter_i] + if { [regexp -nocase -- {^[a-z0-9_\-\.\:]*$} $actual_name] } { # The name of the formal argument in the page set formal_name $actual_name # This will be var(key) for an array set variable_to_set var - # This is the value - set actual_value [ns_set value $form $form_counter_i] - # It may be a signature for another variable if { [regexp {^(.*):sig$} $actual_name match formal_name] } { set apc_signatures($formal_name) $actual_value @@ -1024,7 +1012,6 @@ continue } - # Remember that we've found the spec so we don't complain that this argument is missing ad_page_contract_set_validation_passed $formal_name @@ -1084,7 +1071,7 @@ } } } else { - ad_log warning "ad_page_contract: attempt to use a nonstandard variable name in form. [ns_set key $form $form_counter_i] " + ad_log warning "ad_page_contract: attempt to use a nonstandard variable name in form: '$actual_name'" } }