Index: openacs-4/packages/contacts/www/contact-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/contact-edit.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/contacts/www/contact-edit.tcl 5 Oct 2005 16:18:49 -0000 1.12 +++ openacs-4/packages/contacts/www/contact-edit.tcl 6 Oct 2005 22:26:52 -0000 1.13 @@ -121,13 +121,41 @@ contact::special_attributes::ad_form_save -party_id $party_id -form "party_ae" set revision_id [contact::revision::new -party_id $party_id] + + + foreach form $ams_forms { ams::ad_form::save -package_key "contacts" \ -object_type $object_type \ -list_name $form \ -form_name "party_ae" \ -object_id $revision_id } + + # We need to flush the cache for every attribute_id that this party has + set flush_attribute_list [db_list_of_lists get_attribute_ids { + select + distinct + ams_a.attribute_id + from + ams_attribute_values ams_a, + ams_attribute_values ams_b, + acs_objects o + where + ams_a.object_id = ams_b.object_id + and ams_b.object_id = o.object_id + and o.context_id = :party_id + }] + + foreach attr_id $flush_attribute_list { + util_memoize_flush [list ams::values_not_cached \ + -package_key "contacts" \ + -object_type $object_type \ + -object_id $attr_id] + } + + + util_user_message -html -message "The $object_type [contact::name -party_id $party_id] was updated" set cat_ids [list]