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):
%3 test_fs_publish_file fs_publish_file (test file-storage) fs::get_file_package_id fs::get_file_package_id test_fs_publish_file->fs::get_file_package_id db_string db_string (public) fs::get_file_package_id->db_string packages/file-storage/www/download-zip.tcl packages/file-storage/ www/download-zip.tcl packages/file-storage/www/download-zip.tcl->fs::get_file_package_id

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

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