ckfinder-procs.tcl

CKEditor 5 helper for ckfinder interface (not complete) This script defines the following public procs: ::richtext::ckeditor5::ckfinder::image_attach ::richtext::ckeditor5::ckfinder::return_file

Location:
packages/richtext-ckeditor5/tcl/ckfinder-procs.tcl
Created:
15 Aug 2017
Author:
Gustaf Neumann
CVS Identification:
$Id: ckfinder-procs.tcl,v 1.2 2018/06/29 17:46:00 hectorr Exp $ NOTE: the delivery of files performs two permission checks, once in the requestprocessor (the site nodes) and once for the concrete image. If one whishes to make uploaded images readable by "The Public", make sure that the /

Procedures in this file

Detailed information

richtext::ckeditor5::ckfinder::file_attach (public)

 richtext::ckeditor5::ckfinder::file_attach \
    [ -import_file import_file ] [ -mime_type mime_type ] \
    [ -object_id object_id ] [ -privilege privilege ] \
    [ -user_id user_id ] [ -peeraddr peeraddr ] \
    [ -package_id package_id ] [ -image ]

Insert the provided image file to the content repository as a new item and attach the image to the specified object_id via the attachment API. This makes sure that the image will be deleted from the content repository, when the provided object_id is deleted. The user must have at least "read" privileges on the object, but other stronger privileges can be supplied via parameter.

Switches:
-import_file (optional)
-mime_type (optional)
-object_id (optional)
-privilege (optional, defaults to "read")
-user_id (optional)
-peeraddr (optional)
-package_id (optional)
-image (optional, boolean)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/richtext-ckeditor5/tcl/ckfinder-init.tcl packages/richtext-ckeditor5/ tcl/ckfinder-init.tcl richtext::ckeditor5::ckfinder::file_attach richtext::ckeditor5::ckfinder::file_attach packages/richtext-ckeditor5/tcl/ckfinder-init.tcl->richtext::ckeditor5::ckfinder::file_attach attachments::attach attachments::attach (public) richtext::ckeditor5::ckfinder::file_attach->attachments::attach content::revision::new content::revision::new (public) richtext::ckeditor5::ckfinder::file_attach->content::revision::new permission::require_permission permission::require_permission (public) richtext::ckeditor5::ckfinder::file_attach->permission::require_permission richtext::ckeditor5::ckfinder::require_root_folder richtext::ckeditor5::ckfinder::require_root_folder (private) richtext::ckeditor5::ckfinder::file_attach->richtext::ckeditor5::ckfinder::require_root_folder

Testcases:
No testcase defined.

richtext::ckeditor5::ckfinder::query_page_contract (private)

 richtext::ckeditor5::ckfinder::query_page_contract [ -level level ] \
    params

Helper function similar to ad_page_contract, but works only on query variables.

Switches:
-level (optional, defaults to "1")
Parameters:
params (required)
Returns:
list of complaints, which is empty in case of success

Partial Call Graph (max 5 caller/called nodes):
%3 packages/richtext-ckeditor5/tcl/ckfinder-init.tcl packages/richtext-ckeditor5/ tcl/ckfinder-init.tcl richtext::ckeditor5::ckfinder::query_page_contract richtext::ckeditor5::ckfinder::query_page_contract packages/richtext-ckeditor5/tcl/ckfinder-init.tcl->richtext::ckeditor5::ckfinder::query_page_contract ad_complaints_get_list ad_complaints_get_list (public) richtext::ckeditor5::ckfinder::query_page_contract->ad_complaints_get_list ad_page_contract_filter_invoke ad_page_contract_filter_invoke (public) richtext::ckeditor5::ckfinder::query_page_contract->ad_page_contract_filter_invoke

Testcases:
No testcase defined.

richtext::ckeditor5::ckfinder::require_root_folder (private)

 richtext::ckeditor5::ckfinder::require_root_folder \
    [ -parent_id parent_id ] [ -name name ]

Helper function to find the root folder for ckfinder attachments.

Switches:
-parent_id (optional, defaults to "-100")
-name (optional, defaults to "attachments")

Partial Call Graph (max 5 caller/called nodes):
%3 richtext::ckeditor5::ckfinder::file_attach richtext::ckeditor5::ckfinder::file_attach (public) richtext::ckeditor5::ckfinder::require_root_folder richtext::ckeditor5::ckfinder::require_root_folder richtext::ckeditor5::ckfinder::file_attach->richtext::ckeditor5::ckfinder::require_root_folder content::item::get_id content::item::get_id (public) richtext::ckeditor5::ckfinder::require_root_folder->content::item::get_id content::item::new content::item::new (public) richtext::ckeditor5::ckfinder::require_root_folder->content::item::new

Testcases:
No testcase defined.

richtext::ckeditor5::ckfinder::return_file (public)

 richtext::ckeditor5::ckfinder::return_file \
    [ -revision_id revision_id ] [ -user_id user_id ]

Return the file with the specified revision_id to the user. The user must have at read permissions to obtain the file (image).

Switches:
-revision_id (optional)
-user_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/richtext-ckeditor5/tcl/ckfinder-init.tcl packages/richtext-ckeditor5/ tcl/ckfinder-init.tcl richtext::ckeditor5::ckfinder::return_file richtext::ckeditor5::ckfinder::return_file packages/richtext-ckeditor5/tcl/ckfinder-init.tcl->richtext::ckeditor5::ckfinder::return_file ad_returnfile_background ad_returnfile_background (public) richtext::ckeditor5::ckfinder::return_file->ad_returnfile_background content::revision::get_cr_file_path content::revision::get_cr_file_path (public) richtext::ckeditor5::ckfinder::return_file->content::revision::get_cr_file_path db_string db_string (public) richtext::ckeditor5::ckfinder::return_file->db_string permission::require_permission permission::require_permission (public) richtext::ckeditor5::ckfinder::return_file->permission::require_permission

Testcases:
No testcase defined.
[ show source ]