ad_parameter

one of the documented procedures in this installation of the ACS
Usage:
ad_parameter   name   { subsection "" }   { default "" }
What it does:
Returns the value of a configuration parameter set in one of the .ini files in /web/yourdomain/parameters or in the package manager database tables. In case of a conflict, priority is given to the value in the database. If the parameter doesn't exist, returns the default specified as the third argument then the default value in the database (if appropriate) then the empty string if neither is specified. Note that AOLserver reads these files when the server starts up and stores parameters in an in-memory hash table. The plus side of this is that there is no hit to the file system and no need to memoize a call to ad_parameter. The minus side is that you have to restart the server if you want to test a change made to the .ini file.
Defined in: /web/philip/packages/acs-core/defs-procs.tcl

Source code:



    if [nsv_exists $subsection $name] {
	set config_value [lindex [nsv_get $subsection $name] 0]
    } else {
	set server_name [ns_info server]
	append config_path "ns/server/" $server_name "/acs"
	if ![empty_string_p $subsection] {
	    append config_path "/$subsection"
	}
	set config_value [ns_config $config_path $name]
    }
    if ![empty_string_p $config_value] {
	return $config_value
    } else {
	return $default
    } 


philg@mit.edu