calendar::attachments_enabled_p (public)

 calendar::attachments_enabled_p [ -package_id package_id ]

Defined in packages/calendar/tcl/calendar-procs.tcl

Switches:
-package_id (optional)
the package_id, assumed to belong to a calendar package instance. When not specified, we will determine the package from the connection. When no package can be determined, this proc will return 0.
Returns:
1 if the attachments are enabled, otherwise 0.

Testcases:
attachments_enabled
Source code:
    if {![info exists package_id]} {
        if {[ns_conn isconnected]} {
            set package_id [ad_conn package_id]
        } else {
            ad_log warning "calendar attachments: Cannot determine package_id. Returning 0"
            return 0
        }
    }

    set node_id [site_node::get_node_id_from_object_id -object_id $package_id]
    set nodes [site_node::get_children -package_key attachments -node_id $node_id]

    return [expr {[llength $nodes] > 0}]
Generic XQL file:
packages/calendar/tcl/calendar-procs.xql

PostgreSQL XQL file:
packages/calendar/tcl/calendar-procs-postgresql.xql

Oracle XQL file:
packages/calendar/tcl/calendar-procs-oracle.xql

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