calendar::calendar_list (public)
calendar::calendar_list [ -package_id package_id ] \ [ -user_id user_id ] [ -privilege privilege ]
Defined in packages/calendar/tcl/calendar-procs.tcl
- Switches:
- -package_id (optional)
- -user_id (optional)
- -privilege (optional)
- Returns:
- a list of calendars
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- cal_item_add_delete
Source code: # If no user_id if {$user_id eq ""} { set user_id [ad_conn user_id] } if {$package_id eq ""} { set package_id [ad_conn package_id] } set permissions_clause {} if { $privilege ne "" } { set permissions_clause {and acs_permission.permission_p(calendar_id, :user_id, :privilege)} } set new_list [db_list_of_lists select_calendar_list [subst { select calendar_name, calendar_id, acs_permission.permission_p(calendar_id, :user_id, 'calendar_admin') as calendar_admin_p from calendars where (private_p = 'f' and package_id = :package_id $permissions_clause) or (private_p = 't' and owner_id = :user_id) order by private_p asc, upper(calendar_name) }]]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