Index: openacs-4/packages/bm-portlet/tcl/bm-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bm-portlet/tcl/bm-portlet-procs.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/bm-portlet/tcl/bm-portlet-procs.tcl 10 Jul 2018 15:49:03 -0000 1.8 +++ openacs-4/packages/bm-portlet/tcl/bm-portlet-procs.tcl 3 Sep 2024 15:37:35 -0000 1.9 @@ -74,17 +74,19 @@ ad_proc -public remove_self_from_page { {-portal_id:required} {-package_id:required} + {-extra_params ""} } { Remove the portal element from the given portal. } { portal::remove_element_parameters \ -portal_id $portal_id \ -portlet_name [get_my_name] \ + -value $package_id \ -key package_id \ -extra_params $extra_params } - ad_proc -public show { + ad_proc -private show { cf } { Show the portal element. @@ -93,7 +95,22 @@ -package_key [my_package_key] \ -config_list $cf } - + + ad_proc -private portlet_exists_p {portal_id} { + Helper proc to check portal elements. + } { + set portlet_name [get_my_name] + return [db_0or1row portlet_in_portal { + select 1 from dual where exists ( + select 1 + from portal_element_map pem, + portal_pages pp + where pp.portal_id = :portal_id + and pp.page_id = pem.page_id + and pem.name = :portlet_name + ) + }] + } } # Local variables: