Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/dynamic-types/tcl/00-event-init.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/dynamic-types/tcl/dynamic-type-init.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/dynamic-types/tcl/dynamic-type-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dynamic-types/tcl/dynamic-type-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/dynamic-types/tcl/dynamic-type-procs.tcl 7 Jul 2005 14:00:08 -0000 1.7 +++ openacs-4/packages/dynamic-types/tcl/dynamic-type-procs.tcl 4 Sep 2005 12:13:28 -0000 1.8 @@ -129,9 +129,14 @@ db_exec_plsql drop_type {} + set event(object_type) $name + set event(action) deleted + util::event::fire -event dtype event + if {!$no_flush_p} { - dtype::flush_cache -type $name + dtype::flush_cache -type $name -event event } + } ad_proc -public dtype::create_attribute { @@ -164,10 +169,16 @@ } db_exec_plsql create_attr {} + + set event(object_type) $object_type + set event(attribute) $name + set event(action) created + util::event::fire -event dtype.attribute event if {!$no_flush_p} { - dtype::flush_cache -type $name + dtype::flush_cache -type $name -event event } + } ad_proc -public dtype::get_attributes { @@ -244,10 +255,15 @@ ad_proc -private dtype::flush_cache { {-type:required} + {-event:required} } { Flushes the util_memoize cache of dtype calls for a given object type. + + event is assumed to be a name of an array that contains object_type and action } { - util_memoize_flush_regexp "dtype::get_attributes_list -no_cache -name \"$type\".*" + upvar $event dtype_event + + util_memoize_flush_regexp "dtype::get_attributes_list -no_cache -name \"$dtype_event(object_type)\".*" } ad_proc -public dtype::edit_attribute { @@ -262,8 +278,13 @@ } { db_dml update_attribute {} + set event(object_type) $object_type + set event(attribute) $name + set event(action) updated + util::event::fire -event dtype.attribute event + if {!$no_flush_p} { - dtype::flush_cache -type $name + dtype::flush_cache -type $name -event event } } @@ -289,8 +310,13 @@ db_exec_plsql drop_attr {} + set event(object_type) $object_type + set event(attribute) $name + set event(action) deleted + util::event::fire -event dtype.attribute event + if {!$no_flush_p} { - dtype::flush_cache -type $name + dtype::flush_cache -type $name -event event } } Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/dynamic-types/tcl/event-procs.tcl'. Fisheye: No comparison available. Pass `N' to diff?