Projects
Kolab:3.4
roundcubemail-plugins-kolab
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 8
View file
roundcubemail-plugins-kolab.spec
Changed
@@ -23,7 +23,7 @@ %global roundcube_lib %{_var}/lib/roundcubemail Name: roundcubemail-plugins-kolab -Version: 3.1.1 +Version: 3.1.2 Release: 1%{?dist} Summary: Kolab Groupware plugins for Roundcube Webmail @@ -210,6 +210,9 @@ %attr(0770,root,%{httpd_group}) %{roundcube_lib}/plugins/odfviewer %changelog +* Wed Sep 11 2013 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 3.1.2-1 +- Release 3.1.2 with bugfixes + * Sun Aug 25 2013 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 3.1.1-1 - Release 3.1.1 with bugfixes
View file
debian.changelog
Changed
@@ -1,3 +1,9 @@ +roundcubemail-plugins-kolab (1:3.1.2-1) unstable; urgency=low + + * New upstream version 3.1.2 + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Wed, 11 Sep 2013 18:41:13 +0200 + roundcubemail-plugins-kolab (1:3.1.1-1) unstable; urgency=low * New upstream version 3.1.1
View file
roundcubemail-plugins-kolab-3.1.1.tar.gz/plugins/calendar/calendar.php -> roundcubemail-plugins-kolab-3.1.2.tar.gz/plugins/calendar/calendar.php
Changed
@@ -1205,7 +1205,8 @@ '_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'), - 'changed' => $this->lib->adjust_timezone($event['changed'])->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']), 'description' => strval($event['description']), 'location' => strval($event['location']),
View file
roundcubemail-plugins-kolab-3.1.1.tar.gz/plugins/calendar/drivers/database/SQL/mysql.initial.sql -> roundcubemail-plugins-kolab-3.1.2.tar.gz/plugins/calendar/drivers/database/SQL/mysql.initial.sql
Changed
@@ -12,7 +12,7 @@ * **/ -CREATE TABLE `calendars` ( +CREATE TABLE IF NOT EXISTS `calendars` ( `calendar_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0', `name` varchar(255) NOT NULL, @@ -24,7 +24,7 @@ REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */; -CREATE TABLE `events` ( +CREATE TABLE IF NOT EXISTS `events` ( `event_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `calendar_id` int(11) UNSIGNED NOT NULL DEFAULT '0', `recurrence_id` int(11) UNSIGNED NOT NULL DEFAULT '0', @@ -55,7 +55,7 @@ REFERENCES `calendars`(`calendar_id`) ON DELETE CASCADE ON UPDATE CASCADE ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */; -CREATE TABLE `attachments` ( +CREATE TABLE IF NOT EXISTS `attachments` ( `attachment_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `event_id` int(11) UNSIGNED NOT NULL DEFAULT '0', `filename` varchar(255) NOT NULL DEFAULT '', @@ -67,7 +67,7 @@ REFERENCES `events`(`event_id`) ON DELETE CASCADE ON UPDATE CASCADE ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */; -CREATE TABLE `itipinvitations` ( +CREATE TABLE IF NOT EXISTS `itipinvitations` ( `token` VARCHAR(64) NOT NULL, `event_uid` VARCHAR(255) NOT NULL, `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0', @@ -80,4 +80,4 @@ REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */; -INSERT INTO system (name, value) VALUES ('calendar-database-version', '2013051600'); +REPLACE INTO system (name, value) VALUES ('calendar-database-version', '2013051600');
View file
roundcubemail-plugins-kolab-3.1.1.tar.gz/plugins/calendar/drivers/kolab/SQL/mysql.initial.sql -> roundcubemail-plugins-kolab-3.1.2.tar.gz/plugins/calendar/drivers/kolab/SQL/mysql.initial.sql
Changed
@@ -29,4 +29,4 @@ REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE ) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */; -INSERT INTO system (name, value) VALUES ('calendar-kolab-version', '2013011000'); +REPLACE INTO system (name, value) VALUES ('calendar-kolab-version', '2013011000');
View file
roundcubemail-plugins-kolab-3.1.1.tar.gz/plugins/calendar/drivers/kolab/kolab_driver.php -> roundcubemail-plugins-kolab-3.1.2.tar.gz/plugins/calendar/drivers/kolab/kolab_driver.php
Changed
@@ -935,28 +935,25 @@ // parse free-busy information using Horde classes if ($fbdata) { - $fbcal = $this->cal->get_ical()->get_parser(); - $fbcal->parsevCalendar($fbdata); - if ($fb = $fbcal->findComponent('vfreebusy')) { + $ical = $this->cal->get_ical(); + $ical->import($fbdata); + if ($fb = $ical->freebusy) { $result = array(); - $params = $fb->getExtraParams(); - foreach ($fb->getBusyPeriods() as $from => $to) { - if ($to == null) // no information, assume free - break; - $type = $params[$from]['FBTYPE']; - $result[] = array($from, $to, isset($fbtypemap[$type]) ? $fbtypemap[$type] : calendar::FREEBUSY_BUSY); + foreach ($fb['periods'] as $tuple) { + list($from, $to, $type) = $tuple; + $result[] = array($from->format('U'), $to->format('U'), isset($fbtypemap[$type]) ? $fbtypemap[$type] : calendar::FREEBUSY_BUSY); } // we take 'dummy' free-busy lists as "unknown" - if (empty($result) && ($comment = $fb->getAttribute('COMMENT')) && stripos($comment, 'dummy')) + if (empty($result) && !empty($fb['comment']) && stripos($fb['comment'], 'dummy')) return false; // set period from $start till the begin of the free-busy information as 'unknown' - if (($fbstart = $fb->getStart()) && $start < $fbstart) { + if ($fb['start'] && ($fbstart = $fb['start']->format('U')) && $start < $fbstart) { array_unshift($result, array($start, $fbstart, calendar::FREEBUSY_UNKNOWN)); } // pad period till $end with status 'unknown' - if (($fbend = $fb->getEnd()) && $fbend < $end) { + if ($fb['end'] && ($fbend = $fb['end']->format('U')) && $fbend < $end) { $result[] = array($fbend, $end, calendar::FREEBUSY_UNKNOWN); }
View file
roundcubemail-plugins-kolab-3.1.1.tar.gz/plugins/kolab_addressbook/lib/rcube_kolab_contacts.php -> roundcubemail-plugins-kolab-3.1.2.tar.gz/plugins/kolab_addressbook/lib/rcube_kolab_contacts.php
Changed
@@ -286,19 +286,20 @@ } $ids = array_keys($this->contacts); - $this->result->count = count($this->contacts); } else if (is_array($this->filter['ids'])) { $ids = $this->filter['ids']; - if ($this->result->count = count($ids)) { + if (count($ids)) { $uids = array_map(array($this, 'id2uid'), $this->filter['ids']); $this->_fetch_contacts(array(array('uid', '=', $uids))); } + else { + $this->contacts = array(); + } } else { $this->_fetch_contacts(); $ids = array_keys($this->contacts); - $this->result->count = count($ids); } // sort data arrays according to desired list sorting @@ -309,6 +310,8 @@ $ids = array_values(array_intersect(array_keys($this->contacts), $ids)); else $ids = array_keys($this->contacts); + + $this->result->count = count($ids); } // fill contact data into the current result set @@ -420,6 +423,11 @@ $this->filter['ids'][] = $id; } + // dummy result with contacts count + if (!$select) { + return new rcube_result_set(count($this->filter['ids']), ($this->list_page-1) * $this->page_size); + } + // list records (now limited by $this->filter) return $this->list_records(); } @@ -925,7 +933,7 @@ * * @return boolean True if input is valid, False if not. */ - public function validate($save_data) + public function validate(&$save_data) { // validate e-mail addresses $valid = parent::validate($save_data);
View file
roundcubemail-plugins-kolab-3.1.1.tar.gz/plugins/kolab_auth/kolab_auth.php -> roundcubemail-plugins-kolab-3.1.2.tar.gz/plugins/kolab_auth/kolab_auth.php
Changed
@@ -46,6 +46,7 @@ $this->add_hook('storage_connect', array($this, 'imap_connect')); $this->add_hook('managesieve_connect', array($this, 'imap_connect')); $this->add_hook('smtp_connect', array($this, 'smtp_connect')); + $this->add_hook('identity_form', array($this, 'identity_form')); $this->add_hook('write_log', array($this, 'write_log')); @@ -469,6 +470,37 @@ } /** + * Hook to replace the plain text input field for email address by a drop-down list + * with all email addresses (including aliases) from this user's LDAP record. + */ + public function identity_form($args) + { + $ldap = self::ldap(); + if (!$ldap || !$ldap->ready || empty($_SESSION['kolab_dn'])) { + return $args; + } + + $emails = array(); + $rcmail = rcube::get_instance(); + $user_record = $ldap->get_record($_SESSION['kolab_dn']); + + foreach ((array)$rcmail->config->get('kolab_auth_email', array()) as $col) { + $values = rcube_addressbook::get_col_values($col, $user_record, true); + if (!empty($values)) + $emails = array_merge($emails, array_filter($values)); + } + + if (!empty($emails)) { + $args['form']['addressing']['content']['email'] = array( + 'type' => 'select', + 'options' => array_combine($emails, $emails), + ); + } + + return $args; + } + + /** * Initializes LDAP object and connects to LDAP server */ public static function ldap()
View file
roundcubemail-plugins-kolab-3.1.1.tar.gz/plugins/kolab_files/lib/kolab_files_engine.php -> roundcubemail-plugins-kolab-3.1.2.tar.gz/plugins/kolab_files/lib/kolab_files_engine.php
Changed
@@ -939,7 +939,7 @@ $id = $attachment['id']; // store new attachment in session - unset($attachment['status'], $attachment['abort']); + unset($attachment['data'], $attachment['status'], $attachment['abort']); $COMPOSE['attachments'][$id] = $attachment; if (($icon = $COMPOSE['deleteicon']) && is_file($icon)) {
View file
roundcubemail-plugins-kolab-3.1.1.tar.gz/plugins/libcalendaring/libcalendaring.php -> roundcubemail-plugins-kolab-3.1.2.tar.gz/plugins/libcalendaring/libcalendaring.php
Changed
@@ -120,7 +120,10 @@ else if (is_string($dt)) $dt = new DateTime($dt); - $dt->setTimezone($this->timezone); + if ($dt instanceof DateTime) { + $dt->setTimezone($this->timezone); + } + return $dt; }
View file
roundcubemail-plugins-kolab-3.1.1.tar.gz/plugins/libcalendaring/libvcalendar.php -> roundcubemail-plugins-kolab-3.1.2.tar.gz/plugins/libcalendaring/libvcalendar.php
Changed
@@ -108,7 +108,6 @@ return $this->import_from_vobject($vobject); } catch (Exception $e) { - throw $e; rcube::raise_error(array( 'code' => 600, 'type' => 'php', 'file' => __FILE__, 'line' => __LINE__, @@ -172,8 +171,7 @@ } } else if ($ve->name == 'VFREEBUSY') { - $this->_parse_freebusy($ve); - break; + $this->objects[] = $this->_parse_freebusy($ve); } } } @@ -207,19 +205,20 @@ $event = array( 'uid' => strval($ve->UID), 'title' => strval($ve->SUMMARY), - 'created' => $ve->CREATED ? $ve->CREATED->getDateTime() : null, - 'changed' => null, '_type' => $ve->name == 'VTODO' ? 'task' : 'event', // set defaults 'priority' => 0, 'attendees' => array(), ); - if ($ve->{'LAST-MODIFIED'}) { - $event['changed'] = $ve->{'LAST-MODIFIED'}->getDateTime(); - } - else if ($ve->DTSTAMP) { - $event['changed'] = $ve->DTSTAMP->getDateTime(); + // Catch possible exceptions when date is invalid (Bug #2144) + // We can skip these fields, they aren't critical + foreach (array('CREATED' => 'created', 'LAST-MODIFIED' => 'changed', 'DTSTAMP' => 'changed') as $attr => $field) { + try { + if (!$event[$field] && $ve->{$attr}) { + $event[$field] = $ve->{$attr}->getDateTime(); + } + } catch (Exception $e) {} } // map other attributes to internal fields @@ -454,7 +453,8 @@ */ private function _parse_freebusy($ve) { - $this->freebusy = array('periods' => array()); + $this->freebusy = array('_type' => 'freebusy', 'periods' => array()); + $seen = array(); foreach ($ve->children as $prop) { if (!($prop instanceof VObject\Property)) @@ -476,6 +476,10 @@ $periods = explode(',', $prop->value); $fbtype = strval($prop['FBTYPE']) ?: 'BUSY'; + // skip dupes + if ($seen[$prop->value.':'.$fbtype]++) + continue; + foreach ($periods as $period) { // Every period is formatted as [start]/[end]. The start is an // absolute UTC time, the end may be an absolute UTC time, or
View file
roundcubemail-plugins-kolab-3.1.1.tar.gz/plugins/libcalendaring/tests/libvcalendar.php -> roundcubemail-plugins-kolab-3.1.2.tar.gz/plugins/libcalendaring/tests/libvcalendar.php
Changed
@@ -41,6 +41,10 @@ $this->assertEquals(1, count($events)); $event = $events[0]; + $this->assertInstanceOf('DateTime', $event['created'], "'created' property is DateTime object"); + $this->assertInstanceOf('DateTime', $event['changed'], "'changed' property is DateTime object"); + $this->assertEquals('UTC', $event['created']->getTimezone()->getName(), "'created' date is in UTC"); + $this->assertInstanceOf('DateTime', $event['start'], "'start' property is DateTime object"); $this->assertInstanceOf('DateTime', $event['end'], "'end' property is DateTime object"); $this->assertEquals('08-01', $event['start']->format('m-d'), "Start date is August 1st"); @@ -70,6 +74,17 @@ $this->assertEmpty($events); } + function test_invalid_dates() + { + $ical = new libvcalendar(); + $events = $ical->import_from_file(__DIR__ . '/resources/invalid-dates.ics', 'UTF-8'); + $event = $events[0]; + + $this->assertEquals(1, count($events), "Import event data"); + $this->assertFalse(array_key_exists('created', $event), "No created date field"); + $this->assertFalse(array_key_exists('changed', $event), "No changed date field"); + } + /** * Test some extended ical properties such as attendees, recurrence rules, alarms and attachments * @@ -138,8 +153,8 @@ $this->assertInstanceOf('DateTime', $freebusy['start'], "'start' property is DateTime object"); $this->assertInstanceOf('DateTime', $freebusy['end'], "'end' property is DateTime object"); - $this->assertEquals(50, count($freebusy['periods']), "Number of freebusy periods defined"); - $this->assertEquals(48, count($ical->get_busy_periods()), "Number of busy periods found"); + $this->assertEquals(11, count($freebusy['periods']), "Number of freebusy periods defined"); + $this->assertEquals(9, count($ical->get_busy_periods()), "Number of busy periods found"); } /**
View file
roundcubemail-plugins-kolab-3.1.1.tar.gz/plugins/libcalendaring/tests/resources/freebusy.ifb -> roundcubemail-plugins-kolab-3.1.2.tar.gz/plugins/libcalendaring/tests/resources/freebusy.ifb
Changed
@@ -10,48 +10,12 @@ FREEBUSY;FBTYPE=FREE:20130826T110000Z/20130826T150000Z FREEBUSY:20130826T110000Z/20130826T150000Z FREEBUSY:20130826T110000Z/20130826T150000Z -FREEBUSY:20130826T110000Z/20130826T150000Z -FREEBUSY:20130826T110000Z/20130826T150000Z -FREEBUSY:20130826T110000Z/20130826T150000Z -FREEBUSY:20130826T110000Z/20130826T150000Z -FREEBUSY:20130827T100000Z/20130827T160000Z -FREEBUSY:20130827T100000Z/20130827T160000Z -FREEBUSY:20130827T100000Z/20130827T160000Z -FREEBUSY:20130827T100000Z/20130827T160000Z -FREEBUSY:20130827T100000Z/20130827T160000Z FREEBUSY:20130827T100000Z/20130827T160000Z -FREEBUSY:20130827T100000Z/20130827T160000Z -FREEBUSY:20130828T100000Z/20130828T120000Z -FREEBUSY:20130828T100000Z/20130828T120000Z -FREEBUSY:20130828T100000Z/20130828T120000Z -FREEBUSY:20130828T100000Z/20130828T120000Z FREEBUSY:20130828T100000Z/20130828T120000Z FREEBUSY:20130828T100000Z/20130828T120000Z -FREEBUSY:20130828T100000Z/20130828T120000Z -FREEBUSY:20130830T090000Z/20130830T093000Z -FREEBUSY:20130830T090000Z/20130830T093000Z -FREEBUSY:20130830T090000Z/20130830T093000Z FREEBUSY:20130830T090000Z/20130830T093000Z -FREEBUSY:20130830T090000Z/20130830T093000Z -FREEBUSY:20130830T090000Z/20130830T093000Z -FREEBUSY:20130830T090000Z/20130830T093000Z -FREEBUSY:20130830T093000Z/20130830T100000Z -FREEBUSY:20130830T093000Z/20130830T100000Z -FREEBUSY:20130830T093000Z/20130830T100000Z -FREEBUSY:20130830T093000Z/20130830T100000Z -FREEBUSY:20130830T093000Z/20130830T100000Z -FREEBUSY:20130830T093000Z/20130830T100000Z FREEBUSY:20130830T093000Z/20130830T100000Z FREEBUSY:20130930T070000Z/20130930T160000Z -FREEBUSY:20130930T070000Z/20130930T160000Z -FREEBUSY:20130930T070000Z/20130930T160000Z -FREEBUSY:20130930T070000Z/20130930T160000Z -FREEBUSY:20130930T070000Z/20130930T160000Z -FREEBUSY:20130930T070000Z/20130930T160000Z -FREEBUSY:20130930T070000Z/20130930T160000Z -FREEBUSY:20131104T113000Z/20131104T160000Z -FREEBUSY:20131104T113000Z/20131104T160000Z -FREEBUSY:20131104T113000Z/20131104T160000Z FREEBUSY:20131104T113000Z/20131104T160000Z FREEBUSY;FBTYPE=OOF:20131104T113000Z/20131104T160000Z FREEBUSY;FBTYPE=BUSY-TENTATIVE:20131104T113000Z/20131104T160000Z
View file
roundcubemail-plugins-kolab-3.1.2.tar.gz/plugins/libcalendaring/tests/resources/invalid-dates.ics
Added
@@ -0,0 +1,15 @@ +BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//Apple Inc.//iCal 5.0.3//EN +CALSCALE:GREGORIAN +BEGIN:VEVENT +CREATED:00001231T000000Z +LAST-MODIFIED:20130755 +UID:C968B885-08FB-40E5-B89E-6DA05F26AAFF +TRANSP:TRANSPARENT +SUMMARY:Swiss National Day +DTSTART;VALUE=DATE:20130801 +DTEND;VALUE=DATE:20130802 +SEQUENCE:2 +END:VEVENT +END:VCALENDAR
View file
roundcubemail-plugins-kolab-3.1.1.tar.gz/plugins/libkolab/lib/kolab_storage.php -> roundcubemail-plugins-kolab-3.1.2.tar.gz/plugins/libkolab/lib/kolab_storage.php
Changed
@@ -167,7 +167,7 @@ else $folder->set_folder($foldername); - if ($object = $folder->get_object($uid)) + if ($object = $folder->get_object($uid, '*')) return $object; }
View file
roundcubemail-plugins-kolab-3.1.1.tar.gz/plugins/libkolab/lib/kolab_storage_folder.php -> roundcubemail-plugins-kolab-3.1.2.tar.gz/plugins/libkolab/lib/kolab_storage_folder.php
Changed
@@ -651,8 +651,10 @@ $numatt = count($object['_attachments']); foreach ($object['_attachments'] as $key => $attachment) { // FIXME: kolab_storage and Roundcube attachment hooks use different fields! - if (empty($attachment['content']) && !empty($attachment['data'])) + if (empty($attachment['content']) && !empty($attachment['data'])) { $attachment['content'] = $attachment['data']; + unset($attachment['data'], $object['_attachments'][$key]['data']); + } // make sure size is set, so object saved in cache contains this info if (!isset($attachment['size'])) {
View file
roundcubemail-plugins-kolab-3.1.1.tar.gz/plugins/odfviewer/package.xml -> roundcubemail-plugins-kolab-3.1.2.tar.gz/plugins/odfviewer/package.xml
Changed
@@ -4,7 +4,7 @@ http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd"> <name>odfviewer</name> - <uri>http://kolabsys.com</uri> + <uri>http://git.kolab.org/roundcubemail-plugins-kolab/</uri> <summary>Open Document Viewer plugin</summary> <description>Renders Open Documents directly in the browser by using the WebODF library by Tobias Hintze http://webodf.org</description> <lead>
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.1-1 +Version: 1:3.1.2-1 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 @@ -12,5 +12,5 @@ Package-List: roundcubemail-plugins-kolab deb web extra Files: - 00000000000000000000000000000000 0 roundcubemail-plugins-kolab-3.1.1.tar.gz + 00000000000000000000000000000000 0 roundcubemail-plugins-kolab-3.1.2.tar.gz 00000000000000000000000000000000 0 debian.tar.gz
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
.