Projects
Kolab:3.4
roundcubemail-plugins-kolab
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 24
View file
debian.changelog
Changed
@@ -1,3 +1,9 @@ +roundcubemail-plugins-kolab (1:3.1.6-0~kolab2) unstable; urgency=low + + * include patches, similar to CentOS package + + -- Timotheus Pokorra <timotheus@pokorra.de> Mon, 04 Nov 2013 07:41:13 +0200 + roundcubemail-plugins-kolab (1:3.1.6-0~kolab1) unstable; urgency=low * New upstream version 3.1.6
View file
debian.tar.gz/debian.series
Added
@@ -0,0 +1,5 @@ +roundcubemail-plugins-kolab-3.1.6-task-enhancements.patch -p1 +roundcubemail-plugins-kolab-3.1.6-2353-ics-import-efficiency.patch -p1 +roundcubemail-plugins-kolab-3.1.6-2463-all-day-events-are-off-one-day.patch -p1 +roundcubemail-plugins-kolab-3.1.6-fix-replacement-of-alarm-values.patch -p1 +
View file
debian.tar.gz/patches
Added
+(directory)
View file
debian.tar.gz/patches/roundcubemail-plugins-kolab-3.1.6-2353-ics-import-efficiency.patch
Added
@@ -0,0 +1,744 @@ +diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php +index 685745d..e8e5ab2 100644 +--- a/plugins/calendar/calendar.php ++++ b/plugins/calendar/calendar.php +@@ -1003,7 +1003,7 @@ class calendar extends rcube_plugin + rcube_upload_progress(); + } + +- $calendar = get_input_value('calendar', RCUBE_INPUT_GPC); ++ @set_time_limit(0); + + // process uploaded file if there is no error + $err = $_FILES['_data']['error']; +@@ -1011,22 +1011,23 @@ class calendar extends rcube_plugin + if (!$err && $_FILES['_data']['tmp_name']) { + $calendar = get_input_value('calendar', RCUBE_INPUT_GPC); + $rangestart = $_REQUEST['_range'] ? date_create("now -" . intval($_REQUEST['_range']) . " months") : 0; +- $count = $errors = 0; +- +- try { +- $events = $this->get_ical()->import_from_file($_FILES['_data']['tmp_name'], 'UTF-8', true); +- } +- catch (Exception $e) { +- $errors = 1; +- $msg = $e->getMessage(); +- $events = array(); +- } ++ $user_email = $this->rc->user->get_username(); ++ ++ $ical = $this->get_ical(); ++ $errors = !$ical->fopen($_FILES['_data']['tmp_name']); ++ $count = $i = 0; ++ foreach ($ical as $event) { ++ // keep the browser connection alive on long import jobs ++ if (++$i > 100 && $i % 100 == 0) { ++ echo "<!-- -->"; ++ ob_flush(); ++ } + +- foreach ($events as $event) { + // TODO: correctly handle recurring events which start before $rangestart + if ($event['end'] < $rangestart && (!$event['recurrence'] || ($event['recurrence']['until'] && $event['recurrence']['until'] < $rangestart))) + continue; + ++ $event['_owner'] = $user_email; + $event['calendar'] = $calendar; + if ($this->driver->new_event($event)) { + $count++; +diff --git a/plugins/calendar/calendar_ui.js b/plugins/calendar/calendar_ui.js +index d5a4308..3ef1cb1 100644 +--- a/plugins/calendar/calendar_ui.js ++++ b/plugins/calendar/calendar_ui.js +@@ -1988,10 +1988,15 @@ function rcube_calendar_ui(settings) + rcmail.display_message(rcmail.get_label('importerror', 'calendar'), 'error'); + }); + +- // display upload indicator ++ // display upload indicator (with extended timeout) ++ var timeout = rcmail.env.request_timeout; ++ rcmail.env.request_timeout = 600; + me.import_succeeded = null; + me.saving_lock = rcmail.set_busy(true, 'uploading'); + $('.ui-dialog-buttonpane button', $dialog.parent()).button('disable'); ++ ++ // restore settings ++ rcmail.env.request_timeout = timeout; + } + }; + +diff --git a/plugins/calendar/drivers/kolab/kolab_calendar.php b/plugins/calendar/drivers/kolab/kolab_calendar.php +index 91c8d0c..bd42f56 100644 +--- a/plugins/calendar/drivers/kolab/kolab_calendar.php ++++ b/plugins/calendar/drivers/kolab/kolab_calendar.php +@@ -317,7 +317,7 @@ class kolab_calendar + } + else { + $event['id'] = $event['uid']; +- $this->events[$event['uid']] = $this->_to_rcube_event($object); ++ $this->events = array($event['uid'] => $this->_to_rcube_event($object)); + } + + return $saved; +diff --git a/plugins/libcalendaring/libvcalendar.php b/plugins/libcalendaring/libvcalendar.php +index 5e12d50..aa6dc4a 100644 +--- a/plugins/libcalendaring/libvcalendar.php ++++ b/plugins/libcalendaring/libvcalendar.php +@@ -37,13 +37,17 @@ if (!class_exists('\Sabre\VObject\Reader')) { + * and place the lib files in this plugin's lib directory + * + */ +-class libvcalendar ++class libvcalendar implements Iterator + { + private $timezone; + private $attach_uri = null; + private $prodid = '-//Roundcube//Roundcube libcalendaring//Sabre//Sabre VObject//EN'; + private $type_component_map = array('event' => 'VEVENT', 'task' => 'VTODO'); + private $attendee_keymap = array('name' => 'CN', 'status' => 'PARTSTAT', 'role' => 'ROLE', 'cutype' => 'CUTYPE', 'rsvp' => 'RSVP'); ++ private $iteratorkey = 0; ++ private $charset; ++ private $forward_exceptions; ++ private $fp; + + public $method; + public $agent = ''; +@@ -98,6 +102,13 @@ class libvcalendar + { + $this->method = ''; + $this->objects = array(); ++ $this->freebusy = array(); ++ $this->iteratorkey = 0; ++ ++ if ($this->fp) { ++ fclose($this->fp); ++ $this->fp = null; ++ } + } + + /** +@@ -108,25 +119,36 @@ class libvcalendar + * @param boolean True if parsing exceptions should be forwarded to the caller + * @return array List of events extracted from the input + */ +- public function import($vcal, $charset = 'UTF-8', $forward_exceptions = false) ++ public function import($vcal, $charset = 'UTF-8', $forward_exceptions = false, $memcheck = true) + { + // TODO: convert charset to UTF-8 if other + + try { ++ // estimate the memory usage and try to avoid fatal errors when allowed memory gets exhausted ++ if ($memcheck) { ++ $count = substr_count($vcal, 'BEGIN:VEVENT'); ++ $expected_memory = $count * 70*1024; // assume ~ 70K per event (empirically determined) ++ ++ if (!rcube_utils::mem_check($expected_memory)) { ++ throw new Exception("iCal file too big"); ++ } ++ } ++ + $vobject = VObject\Reader::read($vcal, VObject\Reader::OPTION_FORGIVING | VObject\Reader::OPTION_IGNORE_INVALID_LINES); + if ($vobject) + return $this->import_from_vobject($vobject); + } + catch (Exception $e) { +- rcube::raise_error(array( +- 'code' => 600, 'type' => 'php', +- 'file' => __FILE__, 'line' => __LINE__, +- 'message' => "iCal data parse error: " . $e->getMessage()), +- true, false); +- + if ($forward_exceptions) { + throw $e; + } ++ else { ++ rcube::raise_error(array( ++ 'code' => 600, 'type' => 'php', ++ 'file' => __FILE__, 'line' => __LINE__, ++ 'message' => "iCal data parse error: " . $e->getMessage()), ++ true, false); ++ } + } + + return array(); +@@ -142,17 +164,118 @@ class libvcalendar + */ + public function import_from_file($filepath, $charset = 'UTF-8', $forward_exceptions = false) + { +- $this->objects = array(); +- $fp = fopen($filepath, 'r'); ++ if ($this->fopen($filepath, $charset, $forward_exceptions)) { ++ while ($this->_parse_next(false)) { ++ // nop ++ } ++ ++ fclose($this->fp); ++ $this->fp = null; ++ } ++ ++ return $this->objects; ++ } ++ ++ /** ++ * Open a file to read iCalendar events sequentially ++ * ++ * @param string File path to read from ++ * @param string Input charset (from envelope) ++ * @param boolean True if parsing exceptions should be forwarded to the caller ++ * @return boolean True if file contents are considered valid ++ */ ++ public function fopen($filepath, $charset = 'UTF-8', $forward_exceptions = false) ++ { ++ $this->reset(); ++ ++ // just to be sure... ++ @ini_set('auto_detect_line_endings', true); ++ ++ $this->charset = $charset; ++ $this->forward_exceptions = $forward_exceptions; ++ $this->fp = fopen($filepath, 'r');
View file
debian.tar.gz/patches/roundcubemail-plugins-kolab-3.1.6-2463-all-day-events-are-off-one-day.patch
Added
@@ -0,0 +1,51 @@ +commit 5924783b18b5c423e58b30730bfdee00ca6c85b0 +Author: Thomas Bruederli <bruederli@kolabsys.com> +Date: Fri Nov 1 11:23:42 2013 +0100 + + Don't set timezone on allday dates (#2463) + +diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php +index e8e5ab2..f08798e 100644 +--- a/plugins/calendar/calendar.php ++++ b/plugins/calendar/calendar.php +@@ -1217,7 +1217,7 @@ class calendar extends rcube_plugin + if ($event['recurrence']) { + $event['recurrence_text'] = $this->_recurrence_text($event['recurrence']); + if ($event['recurrence']['UNTIL']) +- $event['recurrence']['UNTIL'] = $this->lib->adjust_timezone($event['recurrence']['UNTIL'])->format('c'); ++ $event['recurrence']['UNTIL'] = $this->lib->adjust_timezone($event['recurrence']['UNTIL'], $event['allday'])->format('c'); + unset($event['recurrence']['EXCEPTIONS']); + } + +@@ -1248,8 +1248,8 @@ class calendar extends rcube_plugin + + return array( + '_id' => $event['calendar'] . ':' . $event['id'], // unique identifier for fullcalendar +- 'start' => $this->lib->adjust_timezone($event['start'])->format('c'), +- 'end' => $this->lib->adjust_timezone($event['end'])->format('c'), ++ 'start' => $this->lib->adjust_timezone($event['start'], $event['allday'])->format('c'), ++ 'end' => $this->lib->adjust_timezone($event['end'], $event['allday'])->format('c'), + // 'changed' might be empty for event recurrences (Bug #2185) + 'changed' => $event['changed'] ? $this->lib->adjust_timezone($event['changed'])->format('c') : null, + 'title' => strval($event['title']), +diff --git a/plugins/libcalendaring/libcalendaring.php b/plugins/libcalendaring/libcalendaring.php +index 47cf67e..4cd5782 100644 +--- a/plugins/libcalendaring/libcalendaring.php ++++ b/plugins/libcalendaring/libcalendaring.php +@@ -120,14 +120,14 @@ class libcalendaring extends rcube_plugin + * @param mixed Any kind of a date representation (DateTime object, string or unix timestamp) + * @return object DateTime object in user's timezone + */ +- public function adjust_timezone($dt) ++ public function adjust_timezone($dt, $dateonly = false) + { + if (is_numeric($dt)) + $dt = new DateTime('@'.$dt); + else if (is_string($dt)) + $dt = new DateTime($dt); + +- if ($dt instanceof DateTime) { ++ if ($dt instanceof DateTime && !($dt->_dateonly || $dateonly)) { + $dt->setTimezone($this->timezone); + } +
View file
debian.tar.gz/patches/roundcubemail-plugins-kolab-3.1.6-fix-replacement-of-alarm-values.patch
Added
@@ -0,0 +1,19 @@ +commit 2784e1a2dd79de0a13fe4cf75ce1d6ce8733d6a3 +Author: Thomas Bruederli <bruederli@kolabsys.com> +Date: Fri Nov 1 14:47:46 2013 +0100 + + Fix replacement of alarm values + +diff --git a/plugins/calendar/drivers/kolab/kolab_calendar.php b/plugins/calendar/drivers/kolab/kolab_calendar.php +index bd42f56..9eb70bd 100644 +--- a/plugins/calendar/drivers/kolab/kolab_calendar.php ++++ b/plugins/calendar/drivers/kolab/kolab_calendar.php +@@ -581,7 +581,7 @@ class kolab_calendar + + // The web client only supports DISPLAY type of alarms + if (!empty($record['alarms'])) +- $record['alarms'] = preg_replace('/:[A-Z]+$/', 'DISPLAY', $record['alarms']); ++ $record['alarms'] = preg_replace('/:[A-Z]+$/', ':DISPLAY', $record['alarms']); + + // remove empty recurrence array + if (empty($record['recurrence']))
View file
debian.tar.gz/patches/roundcubemail-plugins-kolab-3.1.6-task-enhancements.patch
Added
@@ -0,0 +1,1472 @@ +diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php +index f038caf..685745d 100644 +--- a/plugins/calendar/calendar.php ++++ b/plugins/calendar/calendar.php +@@ -126,6 +126,7 @@ class calendar extends rcube_plugin + $this->register_action('mailtoevent', array($this, 'mail_message2event')); + $this->register_action('inlineui', array($this, 'get_inline_ui')); + $this->register_action('check-recent', array($this, 'check_recent')); ++ $this->add_hook('refresh', array($this, 'refresh')); + + // remove undo information... + if ($undo = $_SESSION['calendar_event_undo']) { +@@ -162,6 +163,8 @@ class calendar extends rcube_plugin + 'innerclass' => 'icon calendar', + ))), + 'messagemenu'); ++ ++ $this->api->output->add_label('calendar.createfrommail'); + } + } + +@@ -919,6 +922,38 @@ class calendar extends rcube_plugin + } + + /** ++ * Handler for keep-alive requests ++ * This will check for updated data in active calendars and sync them to the client ++ */ ++ public function refresh($attr) ++ { ++ // refresh the entire calendar every 10th time to also sync deleted events ++ $refetch = rand(0,10) == 10; ++ ++ foreach ($this->driver->list_calendars(true) as $cal) { ++ if ($refetch) { ++ $this->rc->output->command('plugin.refresh_calendar', ++ array('source' => $cal['id'], 'refetch' => true)); ++ } ++ else { ++ $events = $this->driver->load_events( ++ get_input_value('start', RCUBE_INPUT_GET), ++ get_input_value('end', RCUBE_INPUT_GET), ++ get_input_value('q', RCUBE_INPUT_GET), ++ $cal['id'], ++ 1, ++ $attr['last'] ++ ); ++ ++ foreach ($events as $event) { ++ $this->rc->output->command('plugin.refresh_calendar', ++ array('source' => $cal['id'], 'update' => $this->_client_event($event))); ++ } ++ } ++ } ++ } ++ ++ /** + * Handler for pending_alarms plugin hook triggered by the calendar module on keep-alive requests. + * This will check for pending notifications and pass them to the client + */ +@@ -975,10 +1010,18 @@ class calendar extends rcube_plugin + + if (!$err && $_FILES['_data']['tmp_name']) { + $calendar = get_input_value('calendar', RCUBE_INPUT_GPC); +- $events = $this->get_ical()->import_from_file($_FILES['_data']['tmp_name']); +- +- $count = $errors = 0; + $rangestart = $_REQUEST['_range'] ? date_create("now -" . intval($_REQUEST['_range']) . " months") : 0; ++ $count = $errors = 0; ++ ++ try { ++ $events = $this->get_ical()->import_from_file($_FILES['_data']['tmp_name'], 'UTF-8', true); ++ } ++ catch (Exception $e) { ++ $errors = 1; ++ $msg = $e->getMessage(); ++ $events = array(); ++ } ++ + foreach ($events as $event) { + // TODO: correctly handle recurring events which start before $rangestart + if ($event['end'] < $rangestart && (!$event['recurrence'] || ($event['recurrence']['until'] && $event['recurrence']['until'] < $rangestart))) +@@ -1000,8 +1043,9 @@ class calendar extends rcube_plugin + $this->rc->output->command('display_message', $this->gettext('importnone'), 'notice'); + $this->rc->output->command('plugin.import_success', array('source' => $calendar)); + } +- else +- $this->rc->output->command('display_message', $this->gettext('importerror'), 'error'); ++ else { ++ $this->rc->output->command('plugin.import_error', array('message' => $this->gettext('importerror') . ($msg ? ': ' . $msg : ''))); ++ } + } + else { + if ($err == UPLOAD_ERR_INI_SIZE || $err == UPLOAD_ERR_FORM_SIZE) { +@@ -1012,7 +1056,7 @@ class calendar extends rcube_plugin + $msg = rcube_label('fileuploaderror'); + } + +- $this->rc->output->command('display_message', $msg, 'error'); ++ $this->rc->output->command('plugin.import_error', array('message' => $msg)); + $this->rc->output->command('plugin.unlock_saving', false); + } + +diff --git a/plugins/calendar/calendar_base.js b/plugins/calendar/calendar_base.js +index c60c89a..33fe9e4 100644 +--- a/plugins/calendar/calendar_base.js ++++ b/plugins/calendar/calendar_base.js +@@ -6,7 +6,7 @@ + * @author Thomas Bruederli <bruederli@kolabsys.com> + * + * Copyright (C) 2010, Lazlo Westerhof <hello@lazlo.me> +- * Copyright (C) 2012, Kolab Systems AG <contact@kolabsys.com> ++ * Copyright (C) 2013, Kolab Systems AG <contact@kolabsys.com> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as +@@ -36,10 +36,9 @@ function rcube_calendar(settings) + var me = this; + + // create new event from current mail message +- this.create_from_mail = function() ++ this.create_from_mail = function(uid) + { +- var uid; +- if ((uid = rcmail.get_single_uid())) { ++ if (uid || (uid = rcmail.get_single_uid())) { + // load calendar UI (scripts and edit dialog template) + if (!this.ui_loaded) { + $.when( +@@ -53,7 +52,7 @@ function rcube_calendar(settings) + + me.ui_loaded = true; + me.ui = new rcube_calendar_ui(me.settings); +- me.create_from_mail(); // start over ++ me.create_from_mail(uid); // start over + }); + return; + } +@@ -156,9 +155,6 @@ window.rcmail && rcmail.addEventListener('init', function(evt) { + + // register create-from-mail command to message_commands array + if (rcmail.env.task == 'mail') { +- // place link above 'view source' +- $('#messagemenu a.calendarlink').parent().insertBefore($('#messagemenu a.sourcelink').parent()); +- + rcmail.register_command('calendar-create-from-mail', function() { cal.create_from_mail() }); + rcmail.addEventListener('plugin.mail2event_dialog', function(p){ cal.mail2event_dialog(p) }); + rcmail.addEventListener('plugin.unlock_saving', function(p){ cal.ui && cal.ui.unlock_saving(); }); +@@ -169,6 +165,15 @@ window.rcmail && rcmail.addEventListener('init', function(evt) { + } + else + rcmail.enable_command('calendar-create-from-mail', true); ++ ++ // add contextmenu item ++ if (window.rcm_contextmenu_register_command) { ++ rcm_contextmenu_register_command( ++ 'calendar-create-from-mail', ++ function(cmd,el){ cal.create_from_mail() }, ++ 'calendar.createfrommail', ++ 'moveto'); ++ } + } + } + +diff --git a/plugins/calendar/calendar_ui.js b/plugins/calendar/calendar_ui.js +index 986113f..d5a4308 100644 +--- a/plugins/calendar/calendar_ui.js ++++ b/plugins/calendar/calendar_ui.js +@@ -1981,10 +1981,17 @@ function rcube_calendar_ui(settings) + if (form && form.elements._data.value) { + rcmail.async_upload_form(form, 'import_events', function(e) { + rcmail.set_busy(false, null, me.saving_lock); ++ $('.ui-dialog-buttonpane button', $dialog.parent()).button('enable'); ++ ++ // display error message if no sophisticated response from server arrived (e.g. iframe load error) ++ if (me.import_succeeded === null) ++ rcmail.display_message(rcmail.get_label('importerror', 'calendar'), 'error'); + }); + + // display upload indicator ++ me.import_succeeded = null; + me.saving_lock = rcmail.set_busy(true, 'uploading'); ++ $('.ui-dialog-buttonpane button', $dialog.parent()).button('disable'); + } + }; + +@@ -1999,6 +2006,7 @@ function rcube_calendar_ui(settings) + closeOnEscape: false, + title: rcmail.gettext('importevents', 'calendar'), + close: function() { ++ $('.ui-dialog-buttonpane button', $dialog.parent()).button('enable'); + $dialog.dialog("destroy").hide(); + }, + buttons: buttons, +@@ -2010,6 +2018,7 @@ function rcube_calendar_ui(settings) + // callback from server if import succeeded + this.import_success = function(p) + { ++ this.import_succeeded = true;
View file
roundcubemail-plugins-kolab.dsc
Changed
@@ -2,7 +2,7 @@ Source: roundcubemail-plugins-kolab Binary: roundcubemail-plugins-kolab Architecture: all -Version: 1:3.1.6-0~kolab1 +Version: 1:3.1.6-0~kolab2 Maintainer: Christoph Wickert <wickert@kolabsys.com> Uploaders: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>, Paul Klos <kolab@klos2day.nl> Standards-Version: 3.9.3
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.