123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- <?php
- require_once(__DIR__.'/../../common.php');
- require_once(__DIR__.'/constant.php');
- global $conf;
- $endpoint = str_replace('action.php',str_replace(__ROOT__,'',__DIR__).'/calendars.php',$_SERVER['PHP_SELF']);
- $endpoint = str_replace(array('\\','//'),'/',$endpoint);
- $dbmanager = new Configuration();
- $conf->put('WEBDAV_CALENDAR_URL',$endpoint);
- Section::add('calendar');
- $dbmanager->customExecute("
- CREATE TABLE ".ENTITY_PREFIX."plugin_caldav_calendarobjects (
- id integer primary key asc,
- calendardata blob,
- uri text,
- calendarid integer,
- lastmodified integer,
- etag text,
- size integer,
- componenttype text,
- firstoccurence integer,
- lastoccurence integer,
- uid text
- );
- CREATE TABLE ".ENTITY_PREFIX."plugin_caldav_calendars (
- id integer primary key asc,
- principaluri text,
- displayname text,
- uri text,
- synctoken integer,
- description text,
- calendarorder integer,
- calendarcolor text,
- timezone text,
- components text,
- transparent bool
- );
- CREATE TABLE ".ENTITY_PREFIX."plugin_caldav_calendarchanges (
- id integer primary key asc,
- uri text,
- synctoken integer,
- calendarid integer,
- operation integer
- );
- CREATE INDEX calendarid_synctoken ON ".ENTITY_PREFIX."plugin_caldav_calendarchanges (calendarid, synctoken);
- CREATE TABLE ".ENTITY_PREFIX."plugin_caldav_calendarsubscriptions (
- id integer primary key asc,
- uri text,
- principaluri text,
- source text,
- displayname text,
- refreshrate text,
- calendarorder integer,
- calendarcolor text,
- striptodos bool,
- stripalarms bool,
- stripattachments bool,
- lastmodified int
- );
- CREATE TABLE ".ENTITY_PREFIX."plugin_caldav_schedulingobjects (
- id integer primary key asc,
- principaluri text,
- calendardata blob,
- uri text,
- lastmodified integer,
- etag text,
- size integer
- );
- CREATE INDEX principaluri_uri ON ".ENTITY_PREFIX."plugin_caldav_calendarsubscriptions (principaluri, uri);
- CREATE TABLE ".ENTITY_PREFIX."plugin_caldav_principals (
- id INTEGER PRIMARY KEY ASC,
- uri TEXT,
- email TEXT,
- displayname TEXT,
- UNIQUE(uri)
- );
- CREATE TABLE ".ENTITY_PREFIX."plugin_caldav_groupmembers (
- id INTEGER PRIMARY KEY ASC,
- principal_id INTEGER,
- member_id INTEGER,
- UNIQUE(principal_id, member_id)
- );
- ");
- ?>
|