Index: openacs-4/packages/ams/tcl/ams-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ams/tcl/ams-procs-postgresql.xql,v diff -u -r1.20 -r1.21 --- openacs-4/packages/ams/tcl/ams-procs-postgresql.xql 1 Feb 2006 01:07:37 -0000 1.20 +++ openacs-4/packages/ams/tcl/ams-procs-postgresql.xql 20 Feb 2006 06:20:19 -0000 1.21 @@ -37,7 +37,7 @@ - + select attribute_id from acs_attributes Index: openacs-4/packages/ams/tcl/ams-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ams/tcl/ams-procs.tcl,v diff -u -r1.40 -r1.41 --- openacs-4/packages/ams/tcl/ams-procs.tcl 9 Feb 2006 20:46:42 -0000 1.40 +++ openacs-4/packages/ams/tcl/ams-procs.tcl 20 Feb 2006 06:20:19 -0000 1.41 @@ -107,6 +107,15 @@ -object_type:required -attribute_name:required } { + return the attribute_id for the specified attribute. Cached. +} { + return [util_memoize [list ::attribute::id_not_cached -object_type $object_type -attribute_name $attribute_name]] +} + +ad_proc -public attribute::id_not_cached { + -object_type:required + -attribute_name:required +} { return the attribute_id for the specified attribute } { return [db_string get_attribute_id {} -default {}]