mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-09 18:08:49 +00:00
Initial Release of the calendar plugin
This commit is contained in:
parent
45cc9885fc
commit
7115197a33
561 changed files with 189494 additions and 0 deletions
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
# Generated automatically - do not change!
|
||||
|
||||
class DBClass_friendica_calendarobjects extends DBClass_animexx {
|
||||
/** @var $PRIMARY_KEY array */
|
||||
public $PRIMARY_KEY = array("id");
|
||||
|
||||
protected $SRC_TABLE = 'calendarobjects';
|
||||
/** @var $calendardata string|null */
|
||||
/** @var $uri string */
|
||||
/** @var $lastmodified string|null */
|
||||
/** @var $etag string */
|
||||
|
||||
public $calendardata, $uri, $lastmodified, $etag;
|
||||
|
||||
/** @var $id int */
|
||||
/** @var $namespace int */
|
||||
/** @var $namespace_id int */
|
||||
/** @var $size int */
|
||||
|
||||
public $id, $namespace, $namespace_id, $size;
|
||||
|
||||
|
||||
protected $_string_fields = array('calendardata', 'uri', 'lastmodified', 'etag');
|
||||
protected $_int_fields = array('id', 'namespace', 'namespace_id', 'size');
|
||||
protected $_null_fields = array('calendardata', 'lastmodified');
|
||||
}
|
29
dav/common/dbclasses/dbclass.friendica.calendars.class.php
Normal file
29
dav/common/dbclasses/dbclass.friendica.calendars.class.php
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
# Generated automatically - do not change!
|
||||
|
||||
class DBClass_friendica_calendars extends DBClass_animexx {
|
||||
/** @var $PRIMARY_KEY array */
|
||||
public $PRIMARY_KEY = array("namespace", "namespace_id");
|
||||
|
||||
protected $SRC_TABLE = 'calendars';
|
||||
/** @var $calendarcolor string */
|
||||
/** @var $displayname string */
|
||||
/** @var $timezone string */
|
||||
/** @var $description string */
|
||||
|
||||
public $calendarcolor, $displayname, $timezone, $description;
|
||||
|
||||
/** @var $namespace int */
|
||||
/** @var $namespace_id int */
|
||||
/** @var $uid int */
|
||||
/** @var $calendarorder int */
|
||||
/** @var $ctag int */
|
||||
|
||||
public $namespace, $namespace_id, $uid, $calendarorder, $ctag;
|
||||
|
||||
|
||||
protected $_string_fields = array('calendarcolor', 'displayname', 'timezone', 'description');
|
||||
protected $_int_fields = array('namespace', 'namespace_id', 'uid', 'calendarorder', 'ctag');
|
||||
protected $_null_fields = array();
|
||||
}
|
35
dav/common/dbclasses/dbclass.friendica.jqcalendar.class.php
Normal file
35
dav/common/dbclasses/dbclass.friendica.jqcalendar.class.php
Normal file
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
# Generated automatically - do not change!
|
||||
|
||||
class DBClass_friendica_jqcalendar extends DBClass_animexx {
|
||||
/** @var $PRIMARY_KEY array */
|
||||
public $PRIMARY_KEY = array("id");
|
||||
|
||||
protected $SRC_TABLE = 'jqcalendar';
|
||||
/** @var $ical_uri string */
|
||||
/** @var $ical_recurr_uri string */
|
||||
/** @var $Subject string|null */
|
||||
/** @var $Location string|null */
|
||||
/** @var $Description string|null */
|
||||
/** @var $StartTime string|null */
|
||||
/** @var $EndTime string|null */
|
||||
/** @var $Color string|null */
|
||||
/** @var $RecurringRule string|null */
|
||||
|
||||
public $ical_uri, $ical_recurr_uri, $Subject, $Location, $Description, $StartTime, $EndTime, $Color, $RecurringRule;
|
||||
|
||||
/** @var $id int */
|
||||
/** @var $uid int */
|
||||
/** @var $namespace int */
|
||||
/** @var $namespace_id int */
|
||||
/** @var $permission_edit int */
|
||||
/** @var $IsAllDayEvent int */
|
||||
|
||||
public $id, $uid, $namespace, $namespace_id, $permission_edit, $IsAllDayEvent;
|
||||
|
||||
|
||||
protected $_string_fields = array('ical_uri', 'ical_recurr_uri', 'Subject', 'Location', 'Description', 'StartTime', 'EndTime', 'Color', 'RecurringRule');
|
||||
protected $_int_fields = array('id', 'uid', 'namespace', 'namespace_id', 'permission_edit', 'IsAllDayEvent');
|
||||
protected $_null_fields = array('Subject', 'Location', 'Description', 'StartTime', 'EndTime', 'Color', 'RecurringRule');
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
# Generated automatically - do not change!
|
||||
|
||||
class DBClass_friendica_notifications extends DBClass_animexx {
|
||||
/** @var $PRIMARY_KEY array */
|
||||
public $PRIMARY_KEY = array("id");
|
||||
|
||||
protected $SRC_TABLE = 'notifications';
|
||||
/** @var $ical_uri string */
|
||||
/** @var $ical_recurr_uri string */
|
||||
/** @var $alert_date string */
|
||||
/** @var $rel_type string */
|
||||
|
||||
public $ical_uri, $ical_recurr_uri, $alert_date, $rel_type;
|
||||
|
||||
/** @var $id int */
|
||||
/** @var $uid int */
|
||||
/** @var $namespace int */
|
||||
/** @var $namespace_id int */
|
||||
/** @var $rel_value int */
|
||||
/** @var $notified int */
|
||||
|
||||
public $id, $uid, $namespace, $namespace_id, $rel_value, $notified;
|
||||
|
||||
/** @var $REL_TYPE_VALUES array */
|
||||
public static $REL_TYPE_VALUES = array('second', 'minute', 'hour', 'day', 'week', 'month', 'year');
|
||||
public static $REL_TYPE_SECOND = 'second';
|
||||
public static $REL_TYPE_MINUTE = 'minute';
|
||||
public static $REL_TYPE_HOUR = 'hour';
|
||||
public static $REL_TYPE_DAY = 'day';
|
||||
public static $REL_TYPE_WEEK = 'week';
|
||||
public static $REL_TYPE_MONTH = 'month';
|
||||
public static $REL_TYPE_YEAR = 'year';
|
||||
|
||||
|
||||
protected $_string_fields = array('ical_uri', 'ical_recurr_uri', 'alert_date', 'rel_type');
|
||||
protected $_int_fields = array('id', 'uid', 'namespace', 'namespace_id', 'rel_value', 'notified');
|
||||
protected $_null_fields = array();
|
||||
}
|
50
dav/common/dbclasses/dbclass_animexx.class.php
Normal file
50
dav/common/dbclasses/dbclass_animexx.class.php
Normal file
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
class DBClass_animexx
|
||||
{
|
||||
protected $_string_fields = array();
|
||||
protected $_int_fields = array();
|
||||
protected $_float_fields = array();
|
||||
protected $_null_fields = array();
|
||||
|
||||
public $PRIMARY_KEY = array();
|
||||
protected $SRC_TABLE = "";
|
||||
|
||||
/**
|
||||
* @param $dbarray_or_id
|
||||
* @throws Exception
|
||||
*/
|
||||
function __construct($dbarray_or_id)
|
||||
{
|
||||
if (is_numeric($dbarray_or_id) && count($this->PRIMARY_KEY) == 1) {
|
||||
$dbarray_or_id = q("SELECT * FROM %s%s%s WHERE %s=%d",
|
||||
CALDAV_SQL_DB, CALDAV_SQL_PREFIX, $this->SRC_TABLE, $this->PRIMARY_KEY[0], IntVal($dbarray_or_id)
|
||||
);
|
||||
if (count($dbarray_or_id) == 0) throw new Exception("Not found");
|
||||
$dbarray_or_id = $dbarray_or_id[0];
|
||||
}
|
||||
if (is_array($dbarray_or_id)) {
|
||||
foreach ($this->_string_fields as $field) {
|
||||
$this->$field = $dbarray_or_id[$field];
|
||||
}
|
||||
foreach ($this->_int_fields as $field) {
|
||||
$this->$field = IntVal($dbarray_or_id[$field]);
|
||||
}
|
||||
foreach ($this->_float_fields as $field) {
|
||||
$this->$field = FloatVal($dbarray_or_id[$field]);
|
||||
}
|
||||
} else throw new Exception("Not found");
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
function toArray()
|
||||
{
|
||||
$arr = array();
|
||||
foreach ($this->_string_fields as $field) $arr[$field] = $this->$field;
|
||||
foreach ($this->_int_fields as $field) $arr[$field] = $this->$field;
|
||||
foreach ($this->_float_fields as $field) $arr[$field] = $this->$field;
|
||||
return $arr;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue