attachments::get_root_folder (public)

 attachments::get_root_folder [ -package_id package_id ]

Defined in packages/attachments/tcl/attachments-procs.tcl

Switches:
-package_id (optional)
when omitted, will default to the package mounted on the current node's parent.
Returns:
the attachment root folder id for the package.

Partial Call Graph (max 5 caller/called nodes):
%3 test_attachments_url_api attachments_url_api (test attachments) attachments::get_root_folder attachments::get_root_folder test_attachments_url_api->attachments::get_root_folder ad_conn ad_conn (public) attachments::get_root_folder->ad_conn db_string db_string (public) attachments::get_root_folder->db_string site_node::get_parent site_node::get_parent (public) attachments::get_root_folder->site_node::get_parent attachments::context_bar attachments::context_bar (public) attachments::context_bar->attachments::get_root_folder packages/attachments/www/admin/new-root-folder-map.tcl packages/attachments/ www/admin/new-root-folder-map.tcl packages/attachments/www/admin/new-root-folder-map.tcl->attachments::get_root_folder packages/attachments/www/attach.tcl packages/attachments/ www/attach.tcl packages/attachments/www/attach.tcl->attachments::get_root_folder packages/attachments/www/file-add-2.tcl packages/attachments/ www/file-add-2.tcl packages/attachments/www/file-add-2.tcl->attachments::get_root_folder

Testcases:
attachments_url_api
Source code:
        if {$package_id eq ""} {
            # Get the package ID from the parent URL
            array set parent_node [site_node::get_parent -node_id [ad_conn node_id]]
            set package_id $parent_node(object_id)
        }

        return [db_string get_root_folder_select {} -default {}]
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
<fullquery name="attachments::get_root_folder.get_root_folder_select">
    <querytext>
            select folder_id
            from attachments_fs_root_folder_map
            where package_id = :package_id
        </querytext>
</fullquery>
packages/attachments/tcl/attachments-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: