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 -r1.118 -r1.119 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 16 Jan 2010 23:01:04 -0000 1.118 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 10 Mar 2010 00:44:03 -0000 1.119 @@ -1506,6 +1506,16 @@ return [expr { [info exists var] && $var ne "" }] } +ad_proc -public exists_or_null { varname } { + Returns the contents of the variable if it exists, otherwise returns empty string +} { + upvar 1 $varname var + if {[info exists var]} { + return $var + } + return "" +} + ad_proc -public exists_and_equal { varname value } { Returns 1 if the variable name exists in the caller's envirnoment and is equal to the given value.