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 (required)
var (required)
value (required)
Returns:
encoded HTTP query

Partial Call Graph (max 5 caller/called nodes):
%3 test_api__context api__context (test xotcl-core) xo::update_query xo::update_query test_api__context->xo::update_query util::suspicious_query_variable util::suspicious_query_variable (public) xo::update_query->util::suspicious_query_variable Class ::xowf::test_item::Answer_manager Class ::xowf::test_item::Answer_manager (public) Class ::xowf::test_item::Answer_manager->xo::update_query xowf::test_item::Answer_manager instproc runtime_panel xowf::test_item::Answer_manager instproc runtime_panel (public) xowf::test_item::Answer_manager instproc runtime_panel->xo::update_query

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
            || [::util::suspicious_query_variable -proc xo::update_query $key $value]} {
          continue
        }
        append query &[{*}$encodeCmd $key]=[{*}$encodeCmd $value]
      }
    }
    return $query
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: