Several bugfixes and README-update
This commit is contained in:
parent
0fe9be1221
commit
72dd4dffcd
14
README.md
14
README.md
|
@ -47,3 +47,17 @@ So I decided to ditch the "multiple driver" support and keep most changes in the
|
||||||
- All calendars from a source will be automatically added.
|
- All calendars from a source will be automatically added.
|
||||||
- Calendars can be created and deleted directly at the CalDAV source.
|
- Calendars can be created and deleted directly at the CalDAV source.
|
||||||
- ics support included.
|
- ics support included.
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
I havent published this as a plugin, so you have to instruct composer to install directly from github. Run the following commands in the roundcubemail folder
|
||||||
|
(If you get an error that the "API rate limit" has been exceeded and you need an GitHub OAuth token, just follow the instructions in the console - you will need a GitHub account).
|
||||||
|
```
|
||||||
|
cd /pathTo/roundcubemail
|
||||||
|
|
||||||
|
composer config repositories.calendar vcs https://github.com/JodliDev/calendar
|
||||||
|
composer config repositories.libcalendaring vcs https://github.com/JodliDev/libcalendaring
|
||||||
|
composer config minimum-stability dev
|
||||||
|
composer require kolab/calendar
|
||||||
|
|
||||||
|
bin/initdb.sh --dir=plugins/calendar/drivers/caldav/SQL
|
||||||
|
```
|
||||||
|
|
|
@ -4226,7 +4226,7 @@ window.rcmail && rcmail.addEventListener('init', function(evt) {
|
||||||
rcmail.register_command('print', function(){ cal.print_calendars(); }, true);
|
rcmail.register_command('print', function(){ cal.print_calendars(); }, true);
|
||||||
|
|
||||||
// configure list operations
|
// configure list operations
|
||||||
rcmail.register_command('calendar-sources-add', cal.calendar_new_source, true);
|
rcmail.register_command('calendar-sources-new', cal.calendar_new_source, true);
|
||||||
rcmail.register_command('calendar-sources-delete', cal.calendar_delete_sources, true);
|
rcmail.register_command('calendar-sources-delete', cal.calendar_delete_sources, true);
|
||||||
rcmail.register_command('calendar-create', function(){ cal.calendar_edit_dialog(null); }, true);
|
rcmail.register_command('calendar-create', function(){ cal.calendar_edit_dialog(null); }, true);
|
||||||
rcmail.register_command('calendar-edit', function(){ cal.calendar_edit_dialog(cal.calendars[cal.selected_calendar]); }, false);
|
rcmail.register_command('calendar-edit', function(){ cal.calendar_edit_dialog(cal.calendars[cal.selected_calendar]); }, false);
|
||||||
|
|
|
@ -37,7 +37,7 @@ CREATE TABLE IF NOT EXISTS `caldav_sources` (
|
||||||
CREATE TABLE IF NOT EXISTS `caldav_calendars` (
|
CREATE TABLE IF NOT EXISTS `caldav_calendars` (
|
||||||
`calendar_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
`calendar_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
`user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
|
`user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
|
||||||
`source_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
|
`source_id` int(10) UNSIGNED DEFAULT NULL,
|
||||||
`name` varchar(255) NOT NULL,
|
`name` varchar(255) NOT NULL,
|
||||||
`color` varchar(8) NOT NULL,
|
`color` varchar(8) NOT NULL,
|
||||||
`showalarms` tinyint(1) NOT NULL DEFAULT '1',
|
`showalarms` tinyint(1) NOT NULL DEFAULT '1',
|
||||||
|
|
|
@ -41,7 +41,7 @@ CREATE SEQUENCE caldav_calendars_seq;
|
||||||
CREATE TABLE IF NOT EXISTS caldav_calendars (
|
CREATE TABLE IF NOT EXISTS caldav_calendars (
|
||||||
calendar_id int CHECK (calendar_id > 0) NOT NULL DEFAULT NEXTVAL ('caldav_calendars_seq'),
|
calendar_id int CHECK (calendar_id > 0) NOT NULL DEFAULT NEXTVAL ('caldav_calendars_seq'),
|
||||||
user_id int CHECK (user_id > 0) NOT NULL DEFAULT '0',
|
user_id int CHECK (user_id > 0) NOT NULL DEFAULT '0',
|
||||||
source_id int CHECK (source_id > 0) NOT NULL DEFAULT '0',
|
source_id int CHECK (source_id > 0) DEFAULT NULL,
|
||||||
name varchar(255) NOT NULL,
|
name varchar(255) NOT NULL,
|
||||||
color varchar(8) NOT NULL,
|
color varchar(8) NOT NULL,
|
||||||
showalarms smallint NOT NULL DEFAULT '1',
|
showalarms smallint NOT NULL DEFAULT '1',
|
||||||
|
|
|
@ -33,7 +33,7 @@ CREATE TABLE IF NOT EXISTS `caldav_sources` (
|
||||||
CREATE TABLE IF NOT EXISTS `caldav_calendars` (
|
CREATE TABLE IF NOT EXISTS `caldav_calendars` (
|
||||||
`calendar_id` INTEGER NOT NULL PRIMARY KEY,
|
`calendar_id` INTEGER NOT NULL PRIMARY KEY,
|
||||||
`user_id` INTEGER NOT NULL DEFAULT '0',
|
`user_id` INTEGER NOT NULL DEFAULT '0',
|
||||||
`source_id` INTEGER NOT NULL DEFAULT '0',
|
`source_id` INTEGER DEFAULT NULL,
|
||||||
`name` TEXT NOT NULL,
|
`name` TEXT NOT NULL,
|
||||||
`color` TEXT NOT NULL,
|
`color` TEXT NOT NULL,
|
||||||
`showalarms` tinyINTEGER NOT NULL DEFAULT '1',
|
`showalarms` tinyINTEGER NOT NULL DEFAULT '1',
|
||||||
|
|
|
@ -388,7 +388,11 @@ class caldav_client extends Sabre\DAV\Client
|
||||||
</C:mkcalendar>";
|
</C:mkcalendar>";
|
||||||
|
|
||||||
$response = $this->request('MKCALENDAR', $path, $body, $headers);
|
$response = $this->request('MKCALENDAR', $path, $body, $headers);
|
||||||
return $response["statusCode"] === 201;
|
if($response['statusCode'] !== 201) {
|
||||||
|
rcmail::console('Could not create calendar. Response:' .print_r($response, true));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function delete_calendar() {
|
public function delete_calendar() {
|
||||||
|
|
|
@ -363,7 +363,7 @@ class caldav_driver extends calendar_driver
|
||||||
$prop['showalarms']?1:0,
|
$prop['showalarms']?1:0,
|
||||||
$prop['caldav_url'],
|
$prop['caldav_url'],
|
||||||
isset($prop["caldav_tag"]) ? $prop["caldav_tag"] : null,
|
isset($prop["caldav_tag"]) ? $prop["caldav_tag"] : null,
|
||||||
!!$prop['is_ical']
|
$prop['is_ical']?1:0
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
|
|
Loading…
Reference in a new issue