fs::item_editable_info (public, deprecated)
fs::item_editable_info -item_id item_id
Defined in packages/file-storage/tcl/file-storage-procs.tcl
Deprecated. Invoking this procedure generates a warning.
Returns an array containing elements editable_p, mime_type, file_extension if an fs item is editable through the browser, editable_p is set to 1 DEPRECATED: it is unclear what editable is supposed to mean. As of 2023-03-16 file-storage does not offer inline editing and no package, including file-storage itself, appears to be using this api.
- Switches:
- -item_id (required)
- Returns:
- Error:
- Author:
- Deds Castillo <deds@i-manila.com.ph>
- Created:
- 2004-07-03
- See Also:
- nothing
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: ad_log_deprecated proc fs::item_editable_info # ideally, this would get values from parameters # hardcoding it for now set editable_mime_types [list "text/html" "text/plain"] content::item::get -item_id $item_id -array_name item_info set mime_info(mime_type) [set mime_type $item_info(mime_type)] set mime_info(file_extension) [db_string get_extension { select file_extension from cr_mime_types where mime_type = :mime_type }] if {[string tolower $mime_info(mime_type)] in $editable_mime_types} { set mime_info(editable_p) 1 } else { set mime_info(editable_p) 0 } return [array get mime_info]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