calendar::create (public)
calendar::create owner_id private_p [ calendar_name ]
Defined in packages/calendar/tcl/calendar-procs.tcl
Create a new calendar.
- Parameters:
- owner_id (required)
- private_p (required)
- defaults to true since the default calendar is a private calendar.
- calendar_name (optional)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- cal_item_edit_recurrence, cal_item_add_delete
Source code: # find out configuration info set package_id [ad_conn package_id] set creation_ip [ad_conn "peeraddr"] set creation_user [ad_conn "user_id"] # BMA:FIXME: this needs to be fixed a LOT more, but for now we patch the obvious if {$creation_user == 0} { set creation_user $owner_id } set calendar_id [db_exec_plsql create_new_calendar { begin :1 := calendar.new( owner_id => :owner_id, private_p => :private_p, calendar_name => :calendar_name, package_id => :package_id, creation_user => :creation_user, creation_ip => :creation_ip ); end; } ] #removing inherited permissions permission::set_not_inherit -object_id $calendar_id return $calendar_idGeneric XQL file: packages/calendar/tcl/calendar-procs.xql
PostgreSQL XQL file: <fullquery name="calendar::create.create_new_calendar"> <querytext> select calendar__new( null, :calendar_name, 'calendar', :owner_id, :private_p, :package_id, null, now(), :creation_user, :creation_ip ); </querytext> </fullquery>packages/calendar/tcl/calendar-procs-postgresql.xql
Oracle XQL file: <fullquery name="calendar::create.create_new_calendar"> <querytext> begin :1 := calendar.new( owner_id => :owner_id, private_p => :private_p, calendar_name => :calendar_name, package_id => :package_id, creation_user => :creation_user, creation_ip => :creation_ip ); end; </querytext> </fullquery>packages/calendar/tcl/calendar-procs-oracle.xql