Index: openacs-4/packages/layout-manager/tcl/element-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/layout-manager/tcl/element-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/layout-manager/tcl/element-procs.tcl 30 Jul 2008 11:59:33 -0000 1.2 +++ openacs-4/packages/layout-manager/tcl/element-procs.tcl 19 Aug 2008 22:12:43 -0000 1.3 @@ -86,7 +86,16 @@ @param element_id The id of the parameter to be deleted. } { - set page_id [layout::element::get_column_value -element_id $element_id -column page_id] + array set element [layout::element::get -element_id $element_id] + set page_id $element(page_id) + + set uninitializer [layout::includelet::get_column_value \ + -name $element(includelet_name) \ + -column uninitializer] + if { $uninitializer ne "" } { + $uninitializer $element_id + } + db_dml delete_element {} layout::element::flush -element_id $element_id layout::page::flush -page_id $page_id Index: openacs-4/packages/layout-manager/tcl/includelet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/layout-manager/tcl/includelet-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/layout-manager/tcl/includelet-procs.tcl 19 Aug 2008 20:15:58 -0000 1.4 +++ openacs-4/packages/layout-manager/tcl/includelet-procs.tcl 19 Aug 2008 22:12:43 -0000 1.5 @@ -68,3 +68,17 @@ db_1row select_includelet {} -column_array includelet return [array get includelet] } + +ad_proc layout::includelet::get_column_value { + -name:required + -column:required +} { + Return one row column from a layout includelet. + + @param name The name of the includelet. + @param column The name of the column in the layout_elements table. +} { + array set includelet [layout::includelet::get -name $name] + return $includelet($column) +} +