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.

Partial Call Graph (max 5 caller/called nodes):
%3 test_attachments_enabled attachments_enabled (test calendar) calendar::attachments_enabled_p calendar::attachments_enabled_p test_attachments_enabled->calendar::attachments_enabled_p ad_conn ad_conn (public) calendar::attachments_enabled_p->ad_conn ad_log ad_log (public) calendar::attachments_enabled_p->ad_log site_node::get_children site_node::get_children (public) calendar::attachments_enabled_p->site_node::get_children site_node::get_node_id_from_object_id site_node::get_node_id_from_object_id (public) calendar::attachments_enabled_p->site_node::get_node_id_from_object_id calendar::item::get calendar::item::get (public) calendar::item::get->calendar::attachments_enabled_p packages/calendar/www/cal-item-view.tcl packages/calendar/ www/cal-item-view.tcl packages/calendar/www/cal-item-view.tcl->calendar::attachments_enabled_p

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: