ad_scope_vals_sqlWhat it does:
if scope is not set in the topmost environment then public scope is assumed. if scope=group it assumes group_id is set in the topmost environment and if scope=user it assumes that user_id is set in topmost environment and if scope=table it assumes on_which_table and on_what_id are set in topmost environment. ad_scope_sql returns values that need to be inserted in an insert statement. e.g. if scope=group this proc will return '$scope', $group_idDefined in: /web/philip/tcl/ad-scope.tcl
Source code:
if { [uplevel [ad_scope_upvar_level] {info exists scope}] } { upvar [ad_scope_upvar_level] scope scope } else { set scope public } uplevel [ad_scope_upvar_level] { switch $scope { public { return "'$scope'" } group { return "'$scope', $group_id" } user { return "'$scope', $user_id" } table { return "'$scope', '$on_which_table', '$on_what_id'" } } }