Index: openacs-4/packages/xotcl-core/tcl/context-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/context-procs.tcl,v diff -u -r1.35 -r1.36 --- openacs-4/packages/xotcl-core/tcl/context-procs.tcl 19 Mar 2008 13:16:17 -0000 1.35 +++ openacs-4/packages/xotcl-core/tcl/context-procs.tcl 19 May 2008 13:51:28 -0000 1.36 @@ -427,5 +427,21 @@ my exists perconnectionparam($name) } +} +namespace eval ::xo { + + proc ::xo::update_query_variable {old_query var value} { + # + # replace in a url-query old occurances of var with new value. + # + set query [list [list $var $value]] + foreach pair [split $old_query &] { + foreach {key value} [split $pair =] break + if {$key eq $var} continue + lappend query [list [ns_urldecode $key] [ns_urldecode $value]] + } + return $query + } + } \ No newline at end of file