xo::update_query (private)
xo::update_query old_query var value
Defined in packages/xotcl-core/tcl/context-procs.tcl
Replace in a URL-query old occurrences of var with new value.
- Parameters:
- old_query
- var
- value
- Returns:
- encoded HTTP query
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- api__context
Source code: set encodeCmd ns_urlencode if {$::xo::naviserver} {lappend encodeCmd --} set query [{*}$encodeCmd $var]=[{*}$encodeCmd $value] if {$old_query ne ""} { foreach {key value} [ns_set array [ns_parsequery $old_query]] { if {$key eq $var} continue if {[string match "*amp;*" $key]} { ns_log notice ::xo::update_query "ignore suspect query variable" #ns_log notice ::xo::update_query "ignore suspect query variable with key <$key> value <$value>\n" [util::request_info] continue } append query &[{*}$encodeCmd $key]=[{*}$encodeCmd $value] } } return $queryXQL Not present: Generic, PostgreSQL, Oracle