Index: openacs-4/packages/acs-subsite/www/admin/site-map/parameter-set-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/site-map/Attic/parameter-set-oracle.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-subsite/www/admin/site-map/parameter-set-oracle.xql 25 Aug 2001 14:19:46 -0000 1.2 +++ openacs-4/packages/acs-subsite/www/admin/site-map/parameter-set-oracle.xql 18 Nov 2001 12:07:09 -0000 1.3 @@ -17,7 +17,7 @@ -select p.parameter_id, p.parameter_name, nvl(p.description, 'No Description') description, +select p.parameter_id, p.parameter_name, p.package_key, nvl(p.description, 'No Description') description, nvl(v.attr_value, 'No Value') attr_value, nvl(p.section_name, 'No Section Name') section_name from apm_parameters p, (select parameter_id, attr_value from apm_parameter_values v Index: openacs-4/packages/acs-subsite/www/admin/site-map/parameter-set-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/site-map/Attic/parameter-set-postgresql.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-subsite/www/admin/site-map/parameter-set-postgresql.xql 25 Aug 2001 14:19:46 -0000 1.4 +++ openacs-4/packages/acs-subsite/www/admin/site-map/parameter-set-postgresql.xql 18 Nov 2001 12:07:09 -0000 1.5 @@ -17,7 +17,7 @@ -select p.parameter_id, p.parameter_name, coalesce(p.description, 'No Description') as description, +select p.parameter_id, p.parameter_name, p.package_key, coalesce(p.description, 'No Description') as description, coalesce(v.attr_value, 'No Value') as attr_value, coalesce(p.section_name, 'No Section Name') as section_name from apm_parameters p left outer join (select parameter_id, attr_value from apm_parameter_values v Index: openacs-4/packages/acs-subsite/www/admin/site-map/parameter-set.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/site-map/Attic/parameter-set.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-subsite/www/admin/site-map/parameter-set.tcl 27 Apr 2001 05:08:34 -0000 1.2 +++ openacs-4/packages/acs-subsite/www/admin/site-map/parameter-set.tcl 18 Nov 2001 12:07:09 -0000 1.3 @@ -19,7 +19,7 @@ [list parameter_name "Parameter Name"] \ [list description "Description"]] -set table_sql "select p.parameter_id, p.parameter_name, nvl(p.description, 'No Description') description, +set table_sql "select p.parameter_id, p.parameter_name, p.package_key, nvl(p.description, 'No Description') description, nvl(v.attr_value, 'No Value') attr_value, nvl(p.section_name, 'No Section Name') section_name from apm_parameters p, (select parameter_id, attr_value from apm_parameter_values v @@ -39,6 +39,7 @@ lappend table_def [list attr_value "Value" no_sort \ { + [ad_parameter_from_file $parameter_name [uplevel set package_key]] }] append additional_sql [ad_order_by_from_sort_spec $orderby $table_def] @@ -47,6 +48,12 @@

Parameters for $instance_name

[ad_context_bar [list "index" "Site Map"] "$instance_name Parameters"]
+Note text in red below the parameter entry fields indicates the value of this +parameter is being overridden by an entry in the OpenACS parameter file. The +use of the parameter file is discouraged but some sites need it to provide +instance-specific values for parameters independent of the apm_parameter +tables. +
" if { ![empty_string_p $dimensional_list] } { Index: openacs-4/packages/acs-tcl/tcl/defs-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/defs-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-tcl/tcl/defs-procs.tcl 16 Sep 2001 01:06:52 -0000 1.3 +++ openacs-4/packages/acs-tcl/tcl/defs-procs.tcl 18 Nov 2001 12:07:09 -0000 1.4 @@ -469,6 +469,34 @@ } } +ad_proc -public ad_parameter_from_file { + name + {package_key ""} +} { + This proc returns the value of a parameter that has been set in the + parameters/ad.ini file. + + Note: The use of the parameters/ad.ini file is discouraged. Some sites + need it to provide instance-specific parameter values that are independent of the contents of the + apm_parameter tables. + + @param name The name of the parameter. + @return The parameter of the object or if it doesn't exist, the default. +} { + set ns_param "" + + # The below is really a hack because none of the calls to ad_parameter in the system + # actually call 'ad_parameter param_name acs-kernel'. + + if { [empty_string_p $package_key] || $package_key == "acs-kernel"} { + set ns_param [ns_config "ns/server/[ns_info server]/acs" $name] + } else { + set ns_param [ns_config "ns/server/[ns_info server]/acs/$package_key" $name] + } + return $ns_param +} + + ad_proc -private ad_parameter_cache { { -set ""