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

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

Defined in packages/richtext-ckeditor5/tcl/ckfinder-procs.tcl

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.
Source code:
        #
        # Process params provided by the query
        #
        foreach p [split [ns_conn query] &] {
            lassign [split $p =] var value
            set param($var$value
        }
        #ns_log notice "provided params [array get param]"
        #
        # Process params as specified in the page contract
        #
        foreach p $params {
            lassign $p spec default
            lassign [split $spec :] name filters
            #ns_log notice "param $name exists [info exists param($name)]"
            if {[info exists param($name)]} {
                set value $param($name)
                #
                # Call every page contract filter for this
                # parameter. On failures, complaints are added to a
                # global variable which is picked-up later.
                #
                foreach filter [split $filters ,] {
                    ad_page_contract_filter_invoke $filter $name value
                }
            } else {
                set param($name$default
            }
            uplevel $level [list set $name $param($name)]
        }
        if {[info exists ::ad_page_contract_complaints]} {
            set complaints [ad_complaints_get_list]
        } else {
            set complaints ""
        }
        return $complaints
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: