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.7.2.2 -r1.7.2.3 --- openacs-4/packages/bm-portlet/tcl/bm-portlet-procs.tcl 2 Oct 2020 16:51:22 -0000 1.7.2.2 +++ openacs-4/packages/bm-portlet/tcl/bm-portlet-procs.tcl 19 Feb 2021 10:19:46 -0000 1.7.2.3 @@ -95,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: