fs::get_file_package_id (public)
fs::get_file_package_id -file_id file_id
Defined in packages/file-storage/tcl/file-storage-procs.tcl
Returns the package_id for a passed-in file_id. This is useful when using symlinks to files whose real root_folder_id is not the root_folder_id of the package the user is in.
- Switches:
- -file_id (required)
- Returns:
- package_id
- Author:
- Stan Kaufman <skaufman@epimetrics.com>
- Created:
- 2005-09-07
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- fs_publish_file
Source code: return [db_string select_package_id { with recursive hierarchy as ( select package_id, context_id from acs_objects where object_id = :file_id union select o.package_id, o.context_id from acs_objects o, hierarchy h where object_id = h.context_id and h.package_id is null ) select package_id from hierarchy where package_id is not null } -default ""]Generic XQL file: packages/file-storage/tcl/file-storage-procs.xql
PostgreSQL XQL file: packages/file-storage/tcl/file-storage-procs-postgresql.xql
Oracle XQL file: packages/file-storage/tcl/file-storage-procs-oracle.xql