diff --git a/.travis.yml b/.travis.yml index 4b363eb..947d920 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ php: - 5.6 - 7 - 7.2 - - hhvm matrix: fast_finish: true diff --git a/Core/Distrib.php b/Core/Distrib.php index 157b8f0..9b66707 100644 --- a/Core/Distrib.php +++ b/Core/Distrib.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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/"); diff --git a/Core/Frameworks/Baikal/Core/Server.php b/Core/Frameworks/Baikal/Core/Server.php index 8026854..957cac3 100644 --- a/Core/Frameworks/Baikal/Core/Server.php +++ b/Core/Frameworks/Baikal/Core/Server.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/Baikal/Core/Tools.php b/Core/Frameworks/Baikal/Core/Tools.php index 74df50d..9c1caae 100644 --- a/Core/Frameworks/Baikal/Core/Tools.php +++ b/Core/Frameworks/Baikal/Core/Tools.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 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 diff --git a/Core/Frameworks/Baikal/Framework.php b/Core/Frameworks/Baikal/Framework.php index dcfbf75..c1622be 100644 --- a/Core/Frameworks/Baikal/Framework.php +++ b/Core/Frameworks/Baikal/Framework.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/Baikal/Model/AddressBook.php b/Core/Frameworks/Baikal/Model/AddressBook.php index d236e3a..a2f729c 100644 --- a/Core/Frameworks/Baikal/Model/AddressBook.php +++ b/Core/Frameworks/Baikal/Model/AddressBook.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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()) { diff --git a/Core/Frameworks/Baikal/Model/AddressBook/Contact.php b/Core/Frameworks/Baikal/Model/AddressBook/Contact.php index d625d6a..7316796 100644 --- a/Core/Frameworks/Baikal/Model/AddressBook/Contact.php +++ b/Core/Frameworks/Baikal/Model/AddressBook/Contact.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/Baikal/Model/Calendar.php b/Core/Frameworks/Baikal/Model/Calendar.php index 9634655..28d0fd3 100644 --- a/Core/Frameworks/Baikal/Model/Calendar.php +++ b/Core/Frameworks/Baikal/Model/Calendar.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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(); } } diff --git a/Core/Frameworks/Baikal/Model/Calendar/Calendar.php b/Core/Frameworks/Baikal/Model/Calendar/Calendar.php new file mode 100644 index 0000000..40303ef --- /dev/null +++ b/Core/Frameworks/Baikal/Model/Calendar/Calendar.php @@ -0,0 +1,60 @@ + +# 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(); + } + } +} diff --git a/Core/Frameworks/Baikal/Model/Calendar/Event.php b/Core/Frameworks/Baikal/Model/Calendar/Event.php index c307b09..6f9ff2b 100644 --- a/Core/Frameworks/Baikal/Model/Calendar/Event.php +++ b/Core/Frameworks/Baikal/Model/Calendar/Event.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/Baikal/Model/Config.php b/Core/Frameworks/Baikal/Model/Config.php index 15325df..64aee84 100644 --- a/Core/Frameworks/Baikal/Model/Config.php +++ b/Core/Frameworks/Baikal/Model/Config.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/Baikal/Model/Config/Database.php b/Core/Frameworks/Baikal/Model/Config/Database.php index 3394716..8a9bb47 100644 --- a/Core/Frameworks/Baikal/Model/Config/Database.php +++ b/Core/Frameworks/Baikal/Model/Config/Database.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/Baikal/Model/Config/Distrib.php b/Core/Frameworks/Baikal/Model/Config/Distrib.php index e565432..70e1ec9 100644 --- a/Core/Frameworks/Baikal/Model/Config/Distrib.php +++ b/Core/Frameworks/Baikal/Model/Config/Distrib.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/Baikal/Model/Config/Standard.php b/Core/Frameworks/Baikal/Model/Config/Standard.php index d953a02..2e07f44 100644 --- a/Core/Frameworks/Baikal/Model/Config/Standard.php +++ b/Core/Frameworks/Baikal/Model/Config/Standard.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/Baikal/Model/Config/System.php b/Core/Frameworks/Baikal/Model/Config/System.php index 2ea7c43..42feb7e 100644 --- a/Core/Frameworks/Baikal/Model/Config/System.php +++ b/Core/Frameworks/Baikal/Model/Config/System.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/Baikal/Model/Principal.php b/Core/Frameworks/Baikal/Model/Principal.php index cdf5b64..64f1652 100644 --- a/Core/Frameworks/Baikal/Model/Principal.php +++ b/Core/Frameworks/Baikal/Model/Principal.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/Baikal/Model/User.php b/Core/Frameworks/Baikal/Model/User.php index 6dc61f7..9391eea 100644 --- a/Core/Frameworks/Baikal/Model/User.php +++ b/Core/Frameworks/Baikal/Model/User.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/Baikal/WWWRoot/index.php b/Core/Frameworks/Baikal/WWWRoot/index.php index 7f8b36e..60d5a31 100644 --- a/Core/Frameworks/Baikal/WWWRoot/index.php +++ b/Core/Frameworks/Baikal/WWWRoot/index.php @@ -5,7 +5,7 @@ * (c) 2013 Jérôme Schneider * 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 diff --git a/Core/Frameworks/BaikalAdmin/Controller/Dashboard.php b/Core/Frameworks/BaikalAdmin/Controller/Dashboard.php index 4870e4c..9e59da4 100644 --- a/Core/Frameworks/BaikalAdmin/Controller/Dashboard.php +++ b/Core/Frameworks/BaikalAdmin/Controller/Dashboard.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Controller/Install/Database.php b/Core/Frameworks/BaikalAdmin/Controller/Install/Database.php index 9bd03d9..d16a8fa 100644 --- a/Core/Frameworks/BaikalAdmin/Controller/Install/Database.php +++ b/Core/Frameworks/BaikalAdmin/Controller/Install/Database.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Controller/Install/Initialize.php b/Core/Frameworks/BaikalAdmin/Controller/Install/Initialize.php index fc47b12..04ec977 100644 --- a/Core/Frameworks/BaikalAdmin/Controller/Install/Initialize.php +++ b/Core/Frameworks/BaikalAdmin/Controller/Install/Initialize.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Controller/Install/VersionUpgrade.php b/Core/Frameworks/BaikalAdmin/Controller/Install/VersionUpgrade.php index 2783bda..9051f9d 100644 --- a/Core/Frameworks/BaikalAdmin/Controller/Install/VersionUpgrade.php +++ b/Core/Frameworks/BaikalAdmin/Controller/Install/VersionUpgrade.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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(<<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(<<aSuccess[] = 'Created new calendars table'; + } else { // mysql + $pdo->exec(<<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(<<aSuccess[] = 'Created new calendars table'; + } + + $pdo->exec(<<aSuccess[] = 'Migrated calendars table'; + } $this->updateConfiguredVersion($sVersionTo); diff --git a/Core/Frameworks/BaikalAdmin/Controller/Login.php b/Core/Frameworks/BaikalAdmin/Controller/Login.php index 4b30c19..8f64bd3 100644 --- a/Core/Frameworks/BaikalAdmin/Controller/Login.php +++ b/Core/Frameworks/BaikalAdmin/Controller/Login.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Controller/Logout.php b/Core/Frameworks/BaikalAdmin/Controller/Logout.php index 7436c13..1f7284e 100644 --- a/Core/Frameworks/BaikalAdmin/Controller/Logout.php +++ b/Core/Frameworks/BaikalAdmin/Controller/Logout.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Controller/Navigation/Topbar.php b/Core/Frameworks/BaikalAdmin/Controller/Navigation/Topbar.php index 985a2c5..e233bb3 100644 --- a/Core/Frameworks/BaikalAdmin/Controller/Navigation/Topbar.php +++ b/Core/Frameworks/BaikalAdmin/Controller/Navigation/Topbar.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Controller/Navigation/Topbar/Anonymous.php b/Core/Frameworks/BaikalAdmin/Controller/Navigation/Topbar/Anonymous.php index 9b37555..3f94689 100644 --- a/Core/Frameworks/BaikalAdmin/Controller/Navigation/Topbar/Anonymous.php +++ b/Core/Frameworks/BaikalAdmin/Controller/Navigation/Topbar/Anonymous.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Controller/Navigation/Topbar/Install.php b/Core/Frameworks/BaikalAdmin/Controller/Navigation/Topbar/Install.php index 75f371c..fd85250 100644 --- a/Core/Frameworks/BaikalAdmin/Controller/Navigation/Topbar/Install.php +++ b/Core/Frameworks/BaikalAdmin/Controller/Navigation/Topbar/Install.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Controller/Settings/Standard.php b/Core/Frameworks/BaikalAdmin/Controller/Settings/Standard.php index 78a82ef..d6676d5 100644 --- a/Core/Frameworks/BaikalAdmin/Controller/Settings/Standard.php +++ b/Core/Frameworks/BaikalAdmin/Controller/Settings/Standard.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Controller/Settings/System.php b/Core/Frameworks/BaikalAdmin/Controller/Settings/System.php index 3743343..4069fa1 100644 --- a/Core/Frameworks/BaikalAdmin/Controller/Settings/System.php +++ b/Core/Frameworks/BaikalAdmin/Controller/Settings/System.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Controller/User/AddressBooks.php b/Core/Frameworks/BaikalAdmin/Controller/User/AddressBooks.php index ac0e262..2691ac1 100644 --- a/Core/Frameworks/BaikalAdmin/Controller/User/AddressBooks.php +++ b/Core/Frameworks/BaikalAdmin/Controller/User/AddressBooks.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Controller/User/Calendars.php b/Core/Frameworks/BaikalAdmin/Controller/User/Calendars.php index be5c2d3..ce68727 100644 --- a/Core/Frameworks/BaikalAdmin/Controller/User/Calendars.php +++ b/Core/Frameworks/BaikalAdmin/Controller/User/Calendars.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Controller/Users.php b/Core/Frameworks/BaikalAdmin/Controller/Users.php index 7ada2b7..55c29fa 100644 --- a/Core/Frameworks/BaikalAdmin/Controller/Users.php +++ b/Core/Frameworks/BaikalAdmin/Controller/Users.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Core/Auth.php b/Core/Frameworks/BaikalAdmin/Core/Auth.php index 5c77376..5f4e81c 100644 --- a/Core/Frameworks/BaikalAdmin/Core/Auth.php +++ b/Core/Frameworks/BaikalAdmin/Core/Auth.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Core/View.php b/Core/Frameworks/BaikalAdmin/Core/View.php index 6fd0445..c164bb5 100644 --- a/Core/Frameworks/BaikalAdmin/Core/View.php +++ b/Core/Frameworks/BaikalAdmin/Core/View.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Framework.php b/Core/Frameworks/BaikalAdmin/Framework.php index e9fd14e..e71475e 100644 --- a/Core/Frameworks/BaikalAdmin/Framework.php +++ b/Core/Frameworks/BaikalAdmin/Framework.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Resources/Templates/Dashboard.html b/Core/Frameworks/BaikalAdmin/Resources/Templates/Dashboard.html index 11acf8d..f1ff5f7 100644 --- a/Core/Frameworks/BaikalAdmin/Resources/Templates/Dashboard.html +++ b/Core/Frameworks/BaikalAdmin/Resources/Templates/Dashboard.html @@ -1,5 +1,5 @@ {% autoescape false %} -{% set url = 'http://baikal-server.com' %} +{% set url = 'http://sabre.io/baikal' %} @@ -57,7 +57,7 @@

License and credits

Baïkal is open source software licensed under the terms of the GNU GPL v3.

-

Baïkal is based upon other open source projects.
Read the README.md file to learn about that.

+

Baïkal is based upon other open source projects.
Read the README.md file to learn about that.

Baïkal is developed by Jérôme Schneider.

diff --git a/Core/Frameworks/BaikalAdmin/Route/Dashboard.php b/Core/Frameworks/BaikalAdmin/Route/Dashboard.php index 9d36a0b..0ff9bc1 100644 --- a/Core/Frameworks/BaikalAdmin/Route/Dashboard.php +++ b/Core/Frameworks/BaikalAdmin/Route/Dashboard.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Route/Logout.php b/Core/Frameworks/BaikalAdmin/Route/Logout.php index a5c50bd..e883f3d 100644 --- a/Core/Frameworks/BaikalAdmin/Route/Logout.php +++ b/Core/Frameworks/BaikalAdmin/Route/Logout.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Route/Settings/Standard.php b/Core/Frameworks/BaikalAdmin/Route/Settings/Standard.php index 9a47eef..f80442e 100644 --- a/Core/Frameworks/BaikalAdmin/Route/Settings/Standard.php +++ b/Core/Frameworks/BaikalAdmin/Route/Settings/Standard.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Route/Settings/System.php b/Core/Frameworks/BaikalAdmin/Route/Settings/System.php index 3cab07c..05ad024 100644 --- a/Core/Frameworks/BaikalAdmin/Route/Settings/System.php +++ b/Core/Frameworks/BaikalAdmin/Route/Settings/System.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Route/User/AddressBooks.php b/Core/Frameworks/BaikalAdmin/Route/User/AddressBooks.php index 95321ca..35fd066 100644 --- a/Core/Frameworks/BaikalAdmin/Route/User/AddressBooks.php +++ b/Core/Frameworks/BaikalAdmin/Route/User/AddressBooks.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Route/User/Calendars.php b/Core/Frameworks/BaikalAdmin/Route/User/Calendars.php index 2a13144..c255de9 100644 --- a/Core/Frameworks/BaikalAdmin/Route/User/Calendars.php +++ b/Core/Frameworks/BaikalAdmin/Route/User/Calendars.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/Route/Users.php b/Core/Frameworks/BaikalAdmin/Route/Users.php index 76dc13e..1e6e74e 100644 --- a/Core/Frameworks/BaikalAdmin/Route/Users.php +++ b/Core/Frameworks/BaikalAdmin/Route/Users.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/View/Dashboard.php b/Core/Frameworks/BaikalAdmin/View/Dashboard.php index c6220d9..f8e04a3 100644 --- a/Core/Frameworks/BaikalAdmin/View/Dashboard.php +++ b/Core/Frameworks/BaikalAdmin/View/Dashboard.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/View/Install/Database.php b/Core/Frameworks/BaikalAdmin/View/Install/Database.php index 744068c..a51f5e0 100644 --- a/Core/Frameworks/BaikalAdmin/View/Install/Database.php +++ b/Core/Frameworks/BaikalAdmin/View/Install/Database.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/View/Install/Initialize.php b/Core/Frameworks/BaikalAdmin/View/Install/Initialize.php index ff40c45..acc624d 100644 --- a/Core/Frameworks/BaikalAdmin/View/Install/Initialize.php +++ b/Core/Frameworks/BaikalAdmin/View/Install/Initialize.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/View/Login.php b/Core/Frameworks/BaikalAdmin/View/Login.php index 07c9a22..24fa765 100644 --- a/Core/Frameworks/BaikalAdmin/View/Login.php +++ b/Core/Frameworks/BaikalAdmin/View/Login.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/View/Navigation/Topbar.php b/Core/Frameworks/BaikalAdmin/View/Navigation/Topbar.php index d120d40..dd517a0 100644 --- a/Core/Frameworks/BaikalAdmin/View/Navigation/Topbar.php +++ b/Core/Frameworks/BaikalAdmin/View/Navigation/Topbar.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/View/Navigation/Topbar/Anonymous.php b/Core/Frameworks/BaikalAdmin/View/Navigation/Topbar/Anonymous.php index 45bc7d0..488c273 100644 --- a/Core/Frameworks/BaikalAdmin/View/Navigation/Topbar/Anonymous.php +++ b/Core/Frameworks/BaikalAdmin/View/Navigation/Topbar/Anonymous.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/View/Navigation/Topbar/Install.php b/Core/Frameworks/BaikalAdmin/View/Navigation/Topbar/Install.php index 2ae0c86..8fce056 100644 --- a/Core/Frameworks/BaikalAdmin/View/Navigation/Topbar/Install.php +++ b/Core/Frameworks/BaikalAdmin/View/Navigation/Topbar/Install.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/View/Settings/Standard.php b/Core/Frameworks/BaikalAdmin/View/Settings/Standard.php index 76076e3..c85dbbc 100644 --- a/Core/Frameworks/BaikalAdmin/View/Settings/Standard.php +++ b/Core/Frameworks/BaikalAdmin/View/Settings/Standard.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/View/Settings/System.php b/Core/Frameworks/BaikalAdmin/View/Settings/System.php index 6919e37..133b424 100644 --- a/Core/Frameworks/BaikalAdmin/View/Settings/System.php +++ b/Core/Frameworks/BaikalAdmin/View/Settings/System.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/View/User/AddressBooks.php b/Core/Frameworks/BaikalAdmin/View/User/AddressBooks.php index 156f391..d49e443 100644 --- a/Core/Frameworks/BaikalAdmin/View/User/AddressBooks.php +++ b/Core/Frameworks/BaikalAdmin/View/User/AddressBooks.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/View/User/Calendars.php b/Core/Frameworks/BaikalAdmin/View/User/Calendars.php index 79b2ac0..0505d43 100644 --- a/Core/Frameworks/BaikalAdmin/View/User/Calendars.php +++ b/Core/Frameworks/BaikalAdmin/View/User/Calendars.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/View/Users.php b/Core/Frameworks/BaikalAdmin/View/Users.php index 45cdc0c..5ee9710 100644 --- a/Core/Frameworks/BaikalAdmin/View/Users.php +++ b/Core/Frameworks/BaikalAdmin/View/Users.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Frameworks/BaikalAdmin/WWWRoot/index.php b/Core/Frameworks/BaikalAdmin/WWWRoot/index.php index b296d6c..db5676f 100644 --- a/Core/Frameworks/BaikalAdmin/WWWRoot/index.php +++ b/Core/Frameworks/BaikalAdmin/WWWRoot/index.php @@ -5,7 +5,7 @@ * (c) 2013 Jérôme Schneider * 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 diff --git a/Core/Frameworks/BaikalAdmin/WWWRoot/install/index.php b/Core/Frameworks/BaikalAdmin/WWWRoot/install/index.php index 0d264c5..7f5b8cb 100644 --- a/Core/Frameworks/BaikalAdmin/WWWRoot/install/index.php +++ b/Core/Frameworks/BaikalAdmin/WWWRoot/install/index.php @@ -5,7 +5,7 @@ * (c) 2013 Jérôme Schneider * 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 diff --git a/Core/Frameworks/BaikalAdmin/config.php b/Core/Frameworks/BaikalAdmin/config.php index 15fc860..0462965 100644 --- a/Core/Frameworks/BaikalAdmin/config.php +++ b/Core/Frameworks/BaikalAdmin/config.php @@ -5,7 +5,7 @@ # (c) 2013 Jérôme Schneider # 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 diff --git a/Core/Resources/Db/MySQL/db.sql b/Core/Resources/Db/MySQL/db.sql index 6dc4e23..e572c5b 100644 --- a/Core/Resources/Db/MySQL/db.sql +++ b/Core/Resources/Db/MySQL/db.sql @@ -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 ( diff --git a/Core/Resources/Db/SQLite/db.sql b/Core/Resources/Db/SQLite/db.sql index e8b8d55..6d3bf7c 100644 --- a/Core/Resources/Db/SQLite/db.sql +++ b/Core/Resources/Db/SQLite/db.sql @@ -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 ( diff --git a/README.md b/README.md index 9ae7f7e..9cc2de0 100644 --- a/README.md +++ b/README.md @@ -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/ diff --git a/composer.json b/composer.json index dc35613..8c2d1ba 100644 --- a/composer.json +++ b/composer.json @@ -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" : { diff --git a/html/cal.php b/html/cal.php index 7666d77..0992bff 100644 --- a/html/cal.php +++ b/html/cal.php @@ -5,7 +5,7 @@ * (c) 2013 Jérôme Schneider * 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 diff --git a/html/card.php b/html/card.php index 96fbf38..5501ca1 100644 --- a/html/card.php +++ b/html/card.php @@ -5,7 +5,7 @@ * (c) 2013 Jérôme Schneider * 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 diff --git a/html/dav.php b/html/dav.php index c33e47b..12429e5 100644 --- a/html/dav.php +++ b/html/dav.php @@ -5,7 +5,7 @@ * (c) 2013 Jérôme Schneider * 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