Index: openacs-4/packages/acs-admin/www/users/complex-search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/complex-search.tcl,v diff -u -N -r1.21.2.1 -r1.21.2.2 --- openacs-4/packages/acs-admin/www/users/complex-search.tcl 6 Sep 2022 09:44:02 -0000 1.21.2.1 +++ openacs-4/packages/acs-admin/www/users/complex-search.tcl 6 Sep 2022 11:17:46 -0000 1.21.2.2 @@ -90,7 +90,7 @@ if { ![info exists passthrough] } { set passthrough_parameters "" } else { - set passthrough_parameters "[export_entire_form_as_url_vars $passthrough]" + set passthrough_parameters [export_vars -url -formvars $passthrough] } Index: openacs-4/packages/acs-admin/www/users/search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/search.tcl,v diff -u -N -r1.10.2.3 -r1.10.2.4 --- openacs-4/packages/acs-admin/www/users/search.tcl 6 Sep 2022 09:44:03 -0000 1.10.2.3 +++ openacs-4/packages/acs-admin/www/users/search.tcl 6 Sep 2022 11:17:46 -0000 1.10.2.4 @@ -101,7 +101,7 @@ if { ![info exists passthrough] } { set passthrough_parameters "" } else { - set passthrough_parameters [export_entire_form_as_url_vars $passthrough] + set passthrough_parameters [export_vars -url -formvars $passthrough] } if { [llength $limit_to_user_id] > 0} { Index: openacs-4/packages/acs-tcl/tcl/defs-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/defs-procs.tcl,v diff -u -N -r1.81.2.19 -r1.81.2.20 --- openacs-4/packages/acs-tcl/tcl/defs-procs.tcl 27 Aug 2022 20:30:50 -0000 1.81.2.19 +++ openacs-4/packages/acs-tcl/tcl/defs-procs.tcl 6 Sep 2022 11:17:46 -0000 1.81.2.20 @@ -695,7 +695,7 @@ } if {[ns_conn isconnected]} { - set query_list [export_entire_form_as_url_vars] + set query_list [export_vars -url -entire_form] set base_url [ns_conn url] } else { set query_list "" Index: openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl,v diff -u -N -r1.153.2.54 -r1.153.2.55 --- openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 1 Apr 2022 13:54:53 -0000 1.153.2.54 +++ openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 6 Sep 2022 11:17:46 -0000 1.153.2.55 @@ -695,7 +695,7 @@ if { $host_header ne "" && $host_no_port ne $desired_host_no_port } { set query [ns_getform] if { $query ne "" } { - set query "?[export_entire_form_as_url_vars]" + set query ?[export_vars -url -entire_form] } ad_returnredirect -allow_complete_url "[ns_conn location][ns_conn url]$query" return filter_return @@ -877,7 +877,7 @@ # set message $::errorInfo } - set error_url "[ad_url][ad_conn url]?[export_entire_form_as_url_vars]" + set error_url [ad_url][ad_conn url]?[export_vars -url -entire_form] set error_file [ad_conn file] set prev_url [util::get_referrer -trusted] set feedback_id [db_nextval acs_object_id_seq] Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -N -r1.189.2.144 -r1.189.2.145 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 6 Sep 2022 09:44:03 -0000 1.189.2.144 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 6 Sep 2022 11:17:46 -0000 1.189.2.145 @@ -416,6 +416,7 @@ {-exclude {}} {-override {}} {-set {}} + {-formvars {}} {vars {}} } { @@ -597,10 +598,17 @@ ad_urlencode_url proc @param set a ns_set that we want to export together with our - variables. It has no effect when also the 'entire_form' + variables. It has no effect when also the '-entire_form' flag is specified and will otherwise behave as if the current request form data was the supplied ns_set. + @param formvars a list of parameters that will be looked up into + the current request and exported. Won't have any + effect if '-entire_form' or '-set' are specified + and will otherwise behave as if the current + request form data was a subset of the whole form + containing only the selected variables. + @author Lars Pind (lars@pinds.com) @creation-date December 7, 2000 } { @@ -631,10 +639,29 @@ set noprocessing_vars [list] if { $entire_form_p } { + # + # We are exporting all of the request's variables. + # set the_form [ns_getform] } elseif { $set ne "" } { + # + # We are exporting a custom ns_set + # set the_form $set + } elseif { $formvars ne "" } { + # + # We are exporting a subset of the request's variables. + # + set the_form [ns_set create] + foreach var $formvars { + if {[ns_queryexists $var]} { + ns_set put $the_form $var [ns_queryget $var] + } + } } else { + # + # We won't export any ns_set + # set the_form "" } @@ -973,7 +1000,7 @@ } -ad_proc -public export_entire_form_as_url_vars { +ad_proc -deprecated export_entire_form_as_url_vars { {vars_to_passthrough ""} } { export_vars is now the preferred interface. @@ -1013,7 +1040,7 @@ set query [ns_getform] if { $query ne "" } { - append url "?[export_entire_form_as_url_vars]" + append url ?[export_vars -url -entire_form] } return $url Index: openacs-4/packages/chat/www/search-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/search-2.tcl,v diff -u -N -r1.11.2.1 -r1.11.2.2 --- openacs-4/packages/chat/www/search-2.tcl 6 Sep 2022 09:44:03 -0000 1.11.2.1 +++ openacs-4/packages/chat/www/search-2.tcl 6 Sep 2022 11:17:46 -0000 1.11.2.2 @@ -81,7 +81,7 @@ if { ![info exists passthrough] } { set passthrough_parameters "" } else { - set passthrough_parameters "[export_entire_form_as_url_vars $passthrough]" + set passthrough_parameters [export_vars -url -formvars $passthrough] } if { [info exists limit_to_users_in_group_id] && $limit_to_users_in_group_id ne "" } {