Index: openacs-4/packages/contacts/www/admin/remove-default.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/admin/remove-default.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/contacts/www/admin/remove-default.tcl 9 Sep 2005 22:18:28 -0000 1.1 +++ openacs-4/packages/contacts/www/admin/remove-default.tcl 11 Nov 2005 22:57:08 -0000 1.2 @@ -5,14 +5,25 @@ @author Viaro Network www.viaro.net @creation-date 2005-09-08 } { - extend_id:multiple,notnull + extend_id:multiple,optional + attribute_id:multiple,optional search_id:integer,notnull } -foreach value $extend_id { - db_dml unmap_extend_id { - delete from contact_search_extend_map where search_id = :search_id and extend_id = :value +if { [exists_and_not_null extend_id] } { + foreach value $extend_id { + db_dml unmap_extend_id { + delete from contact_search_extend_map where search_id = :search_id and extend_id = :value + } } } -ad_returnredirect [get_referrer] \ No newline at end of file +if { [exists_and_not_null attribute_id] } { + foreach value $attribute_id { + db_dml unmap_extend_id { + delete from contact_search_extend_map where search_id = :search_id and attribute_id = :value + } + } +} + +ad_returnredirect search-list \ No newline at end of file