Merge branch 'master' into patch-1

This commit is contained in:
H. Lehmann 2019-04-22 22:53:02 +02:00 committed by GitHub
commit 03975797df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 324 additions and 81 deletions

View file

@ -5,7 +5,6 @@ php:
- 5.6
- 7
- 7.2
- hhvm
matrix:
fast_finish: true

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it
@ -24,5 +24,5 @@
# This copyright notice MUST APPEAR in all copies of the script!
#################################################################
define("BAIKAL_VERSION", "0.5.0");
define("BAIKAL_VERSION", "0.5.1");
define("BAIKAL_HOMEPAGE", "http://sabre.io/baikal/");

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it
@ -172,7 +172,7 @@ Copyright notice
(c) {$iYear} Jérôme Schneider <mail@jeromeschneider.fr>
All rights reserved
http://baikal-server.com
http://sabre.io/baikal
This script is part of the Baïkal Server project. The Baïkal
Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it
@ -89,9 +89,8 @@ class AddressBook extends \Flake\Core\Model\Db {
]));
$oMorpho->add(new \Formal\Element\Text([
"prop" => "description",
"label" => "Description",
"validation" => "required"
"prop" => "description",
"label" => "Description"
]));
if ($this->floating()) {

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it
@ -28,7 +28,7 @@
namespace Baikal\Model;
class Calendar extends \Flake\Core\Model\Db {
const DATATABLE = "calendars";
const DATATABLE = "calendarinstances";
const PRIMARYKEY = "id";
const LABELFIELD = "displayname";
@ -40,8 +40,25 @@ class Calendar extends \Flake\Core\Model\Db {
"calendarorder" => 0,
"calendarcolor" => "",
"timezone" => "",
"components" => "",
"calendarid" => 0
];
protected $oCalendar; # Baikal\Model\Calendar\Calendar
protected function initFloating() {
parent::initFloating();
$this->oCalendar = new Calendar\Calendar();
}
protected function initByPrimary($sPrimary) {
parent::initByPrimary($sPrimary);
$this->oCalendar = new Calendar\Calendar($this->get("calendarid"));
}
function persist() {
$this->oCalendar->persist();
$this->aData["calendarid"] = $this->oCalendar->get("id");
parent::persist();
}
static function icon() {
return "icon-calendar";
@ -67,6 +84,10 @@ class Calendar extends \Flake\Core\Model\Db {
function get($sPropName) {
if ($sPropName === "components") {
return $this->oCalendar->get($sPropName);
}
if ($sPropName === "todos") {
# TRUE if components contains VTODO, FALSE otherwise
if (($sComponents = $this->get("components")) !== "") {
@ -94,6 +115,10 @@ class Calendar extends \Flake\Core\Model\Db {
function set($sPropName, $sValue) {
if ($sPropName === "components") {
return $this->oCalendar->set($sPropName, $sValue);
}
if ($sPropName === "todos") {
if (($sComponents = $this->get("components")) !== "") {
@ -112,7 +137,7 @@ class Calendar extends \Flake\Core\Model\Db {
}
}
return parent::set("components", implode(",", $aComponents));
return $this->set("components", implode(",", $aComponents));
}
if ($sPropName === "notes") {
@ -133,7 +158,7 @@ class Calendar extends \Flake\Core\Model\Db {
}
}
return parent::set("components", implode(",", $aComponents));
return $this->set("components", implode(",", $aComponents));
}
return parent::set($sPropName, $sValue);
@ -215,5 +240,6 @@ class Calendar extends \Flake\Core\Model\Db {
}
parent::destroy();
$this->oCalendar->destroy();
}
}

View file

@ -0,0 +1,60 @@
<?php
#################################################################
# Copyright notice
#
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# The GNU General Public License can be found at
# http://www.gnu.org/copyleft/gpl.html.
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# This copyright notice MUST APPEAR in all copies of the script!
#################################################################
namespace Baikal\Model\Calendar;
class Calendar extends \Flake\Core\Model\Db {
const DATATABLE = "calendars";
const PRIMARYKEY = "id";
const LABELFIELD = "components";
protected $aData = [
"synctoken" => "",
"components" => ""
];
function hasInstances() {
$rSql = $GLOBALS["DB"]->exec_SELECTquery(
"*",
"calendarinstances",
"calendarid" . "='" . $this->aData["id"] . "'"
);
if (($aRs = $rSql->fetch()) === false) {
return false;
} else {
reset($aRs);
return true;
}
}
function destroy() {
if (!$this->hasInstances()) {
parent::destroy();
}
}
}

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
* (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
* All rights reserved
*
* http://baikal-server.com
* http://sabre.io/baikal
*
* This script is part of the Baïkal Server project. The Baïkal
* Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it
@ -377,6 +377,141 @@ CREATE TABLE addressbooks (
}
}
if (version_compare($sVersionFrom, '0.5.1', '<')) {
if (!defined("PROJECT_DB_MYSQL") || PROJECT_DB_MYSQL === false) {
$pdo->exec(<<<SQL
CREATE TABLE calendarinstances (
id integer primary key asc NOT NULL,
calendarid integer,
principaluri text,
access integer COMMENT '1 = owner, 2 = read, 3 = readwrite' NOT NULL DEFAULT '1',
displayname text,
uri text NOT NULL,
description text,
calendarorder integer,
calendarcolor text,
timezone text,
transparent bool,
share_href text,
share_displayname text,
share_invitestatus integer DEFAULT '2',
UNIQUE (principaluri, uri),
UNIQUE (calendarid, principaluri),
UNIQUE (calendarid, share_href)
);
SQL
);
$this->aSuccess[] = 'Created calendarinstances table';
$pdo->exec('
INSERT INTO calendarinstances
(
calendarid,
principaluri,
access,
displayname,
uri,
description,
calendarorder,
calendarcolor,
transparent
)
SELECT
id,
principaluri,
1,
displayname,
uri,
description,
calendarorder,
calendarcolor,
transparent
FROM calendars
');
$this->aSuccess[] = 'Migrated calendarinstances table';
$calendarBackup = 'calendars_3_1';
$pdo->exec('ALTER TABLE calendars RENAME TO ' . $calendarBackup);
$this->aSuccess[] = 'Did calendars backup';
$pdo->exec(<<<SQL
CREATE TABLE calendars (
id integer primary key asc NOT NULL,
synctoken integer DEFAULT 1 NOT NULL,
components text NOT NULL
);
SQL
);
$this->aSuccess[] = 'Created new calendars table';
} else { // mysql
$pdo->exec(<<<SQL
CREATE TABLE calendarinstances (
id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
calendarid INTEGER UNSIGNED NOT NULL,
principaluri VARBINARY(100),
access TINYINT(1) NOT NULL DEFAULT '1' COMMENT '1 = owner, 2 = read, 3 = readwrite',
displayname VARCHAR(100),
uri VARBINARY(200),
description TEXT,
calendarorder INT(11) UNSIGNED NOT NULL DEFAULT '0',
calendarcolor VARBINARY(10),
timezone TEXT,
transparent TINYINT(1) NOT NULL DEFAULT '0',
share_href VARBINARY(100),
share_displayname VARCHAR(100),
share_invitestatus TINYINT(1) NOT NULL DEFAULT '2' COMMENT '1 = noresponse, 2 = accepted, 3 = declined, 4 = invalid',
UNIQUE(principaluri, uri),
UNIQUE(calendarid, principaluri),
UNIQUE(calendarid, share_href)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
SQL
);
$this->aSuccess[] = 'Created calendarinstances table';
$pdo->exec('
INSERT INTO calendarinstances
(
calendarid,
principaluri,
access,
displayname,
uri,
description,
calendarorder,
calendarcolor,
transparent
)
SELECT
id,
principaluri,
1,
displayname,
uri,
description,
calendarorder,
calendarcolor,
transparent
FROM calendars
');
$this->aSuccess[] = 'Migrated calendarinstances table';
$calendarBackup = 'calendars_3_1';
$pdo->exec('RENAME TABLE calendars TO ' . $calendarBackup);
$this->aSuccess[] = 'Did calendars backup';
$pdo->exec(<<<SQL
CREATE TABLE calendars (
id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
synctoken INTEGER UNSIGNED NOT NULL DEFAULT '1',
components VARBINARY(21)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
SQL
);
$this->aSuccess[] = 'Created new calendars table';
}
$pdo->exec(<<<SQL
INSERT INTO calendars (id, synctoken, components) SELECT id, synctoken, COALESCE(components,"VEVENT,VTODO,VJOURNAL") as components FROM $calendarBackup
SQL
);
$this->aSuccess[] = 'Migrated calendars table';
}
$this->updateConfiguredVersion($sVersionTo);

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -1,5 +1,5 @@
{% autoescape false %}
{% set url = 'http://baikal-server.com' %}
{% set url = 'http://sabre.io/baikal' %}
<style>
.label-intext { vertical-align: top;}
</style>
@ -57,7 +57,7 @@
<div class="span6">
<h2>License and credits</h2>
<p>Baïkal is open source software licensed under the terms of the GNU GPL v3.</p>
<p>Baïkal is based upon other open source projects.<br />Read the <a href="https://github.com/jeromeschneider/Baikal/blob/master/README.md" target="_blank">README.md</a> file to learn about that.</p>
<p>Baïkal is based upon other open source projects.<br />Read the <a href="https://github.com/sabre-io/Baikal/blob/master/README.md" target="_blank">README.md</a> file to learn about that.</p>
<p>Baïkal is developed by <a href="https://github.com/jeromeschneider" target="_blank">Jérôme Schneider</a>.
</div>
</div>

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
* (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
* All rights reserved
*
* http://baikal-server.com
* http://sabre.io/baikal
*
* This script is part of the Baïkal Server project. The Baïkal
* Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
* (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
* All rights reserved
*
* http://baikal-server.com
* http://sabre.io/baikal
*
* This script is part of the Baïkal Server project. The Baïkal
* Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
# (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
# All rights reserved
#
# http://baikal-server.com
# http://sabre.io/baikal
#
# This script is part of the Baïkal Server project. The Baïkal
# Server project is free software; you can redistribute it

View file

@ -26,6 +26,7 @@ CREATE TABLE addressbookchanges (
operation TINYINT(1) NOT NULL,
INDEX addressbookid_synctoken (addressbookid, synctoken)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE calendarobjects (
id INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
calendardata MEDIUMBLOB,
@ -43,17 +44,28 @@ CREATE TABLE calendarobjects (
CREATE TABLE calendars (
id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
synctoken INTEGER UNSIGNED NOT NULL DEFAULT '1',
components VARBINARY(21)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE calendarinstances (
id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
calendarid INTEGER UNSIGNED NOT NULL,
principaluri VARBINARY(100),
access TINYINT(1) NOT NULL DEFAULT '1',
displayname VARCHAR(100),
uri VARBINARY(200),
synctoken INTEGER UNSIGNED NOT NULL DEFAULT '1',
description TEXT,
calendarorder INT(11) UNSIGNED NOT NULL DEFAULT '0',
calendarcolor VARBINARY(10),
timezone TEXT,
components VARBINARY(21),
transparent TINYINT(1) NOT NULL DEFAULT '0',
UNIQUE(principaluri, uri)
share_href VARBINARY(100),
share_displayname VARCHAR(100),
share_invitestatus TINYINT(1) NOT NULL DEFAULT '2',
UNIQUE(principaluri, uri),
UNIQUE(calendarid, principaluri),
UNIQUE(calendarid, share_href)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE calendarchanges (

View file

@ -42,16 +42,28 @@ CREATE TABLE calendarobjects (
CREATE TABLE calendars (
id integer primary key asc NOT NULL,
principaluri text NOT NULL,
synctoken integer DEFAULT 1 NOT NULL,
components text NOT NULL
);
CREATE TABLE calendarinstances (
id integer primary key asc NOT NULL,
calendarid integer,
principaluri text,
access integer,
displayname text,
uri text NOT NULL,
synctoken integer DEFAULT 1 NOT NULL,
description text,
calendarorder integer,
calendarcolor text,
timezone text,
components text NOT NULL,
transparent bool
transparent bool,
share_href text,
share_displayname text,
share_invitestatus integer DEFAULT '2',
UNIQUE (principaluri, uri),
UNIQUE (calendarid, principaluri),
UNIQUE (calendarid, share_href)
);
CREATE TABLE calendarchanges (

View file

@ -7,8 +7,8 @@ This is the source repository for the Baïkal CalDAV and CardDAV server.
Head to [sabre.io/baikal][2] for information about installation, upgrading and troubleshooting.
Upgrading from 0.2.7
--------------------
Upgrading
---------
Please follow [the upgrade instructions][5].
@ -16,7 +16,7 @@ Credits
-------
Bäikal is developed by [Jérôme Schneider][3] from [Net Gusto][3] and [fruux][4].
Many thanks to Daniel Aleksandersen (@zcode) for greatly improving the quality of the project page (http://baikal-server.com).
Many thanks to Daniel Aleksandersen (@zcode) for greatly improving the quality of the project page.
[2]: http://sabre.io/baikal/
[3]: http://netgusto.com/

View file

@ -14,7 +14,7 @@
],
"require": {
"php" : ">=5.5",
"sabre/dav" : "~3.1.2",
"sabre/dav" : "~3.2.3",
"twig/twig" : "~1.8.0"
},
"require-dev" : {

View file

@ -5,7 +5,7 @@
* (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
* All rights reserved
*
* http://baikal-server.com
* http://sabre.io/baikal
*
* This script is part of the Baïkal Server project. The Baïkal
* Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
* (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
* All rights reserved
*
* http://baikal-server.com
* http://sabre.io/baikal
*
* This script is part of the Baïkal Server project. The Baïkal
* Server project is free software; you can redistribute it

View file

@ -5,7 +5,7 @@
* (c) 2013 Jérôme Schneider <mail@jeromeschneider.fr>
* All rights reserved
*
* http://baikal-server.com
* http://sabre.io/baikal
*
* This script is part of the Baïkal Server project. The Baïkal
* Server project is free software; you can redistribute it