Projects
Kolab:16
kolab-syncroton
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
kolab-syncroton.spec
Changed
@@ -30,15 +30,15 @@ %global _ap_sysconfdir %{_sysconfdir}/%{httpd_name} Name: kolab-syncroton -Version: 2.3.2 -Release: 1%{?dist} +Version: 2.3.3 +Release: 0.20160222.git%{?dist} Summary: ActiveSync for Kolab Groupware Group: Applications/Internet License: LGPLv2 URL: http://www.syncroton.org -Source0: http://mirror.kolabsys.com/pub/releases/%{name}-%{version}.tar.gz +Source0: kolab-syncroton-2.3.3.tar.gz Source1: kolab-syncroton.logrotate BuildArch: noarch
View file
debian.changelog
Changed
@@ -1,4 +1,4 @@ -kolab-syncroton (2.3.2-0~kolab1) unstable; urgency=low +kolab-syncroton (2.3.3~dev20160222-0~kolab1) unstable; urgency=low * Release of version 2.3.2, see:
View file
kolab-syncroton-2.3.2.tar.gz/config/config.inc.php.dist -> kolab-syncroton-2.3.3.tar.gz/config/config.inc.php.dist
Changed
@@ -8,7 +8,7 @@ // Enables logging to a separate directory for every user/device $config['activesync_user_log'] = false; -// Enable per-user debugging only if /var/log/syncroton/<username>/ folder exists +// Enable per-user debugging only if /var/log/kolab-syncroton/<username>/ folder exists $config['activesync_user_debug'] = false; // If specified all ActiveSync-related logs will be saved to this file
View file
kolab-syncroton-2.3.2.tar.gz/lib/kolab_sync_backend_state.php -> kolab-syncroton-2.3.3.tar.gz/lib/kolab_sync_backend_state.php
Changed
@@ -86,7 +86,7 @@ $object = parent::get_object($data); if ($object->pendingdata) { - $object->pendingdata = json_decode($object->pendingdata); + $object->pendingdata = json_decode($object->pendingdata, true); } return $object;
View file
kolab-syncroton-2.3.2.tar.gz/lib/kolab_sync_data_calendar.php -> kolab-syncroton-2.3.3.tar.gz/lib/kolab_sync_data_calendar.php
Changed
@@ -254,12 +254,12 @@ } // Event reminder time - if ($config['ALARMS'] && ($minutes = $this->from_kolab_alarm($event))) { - $result['reminder'] = $minutes; + if ($config['ALARMS']) { + $result['reminder'] = $this->from_kolab_alarm($event); } $result['categories'] = array(); - $result['attendees'] = array(); + $result['attendees'] = array(); // Categories, Roundcube Calendar plugin supports only one category at a time if (!empty($event['categories'])) { @@ -543,10 +543,14 @@ } } - if ($value && preg_match('/^-[PT]*([0-9]+)([WDHMS])$/', $value, $matches)) { - $value = intval($matches[1]); + if ($value && preg_match('/^([-+]*)[PT]*([0-9]+)([WDHMS])$/', $value, $matches)) { + $value = intval($matches[2]); + + if ($value && $matches[1] != '-') { + return null; + } - switch ($matches[2]) { + switch ($matches[3]) { case 'S': $value = intval(round($value/60)); break; case 'H': $value *= 60; break; case 'D': $value *= 24 * 60; break; @@ -562,6 +566,10 @@ */ protected function to_kolab_alarm($value, $event) { + if ($value === null || $value === '') { + return (array) $event['valarms']; + } + $valarms = array(); $unsupported = array(); @@ -576,13 +584,11 @@ } } - if ($value) { - $valarms[] = array( - 'action' => $current['action'] ?: 'DISPLAY', - 'description' => $current['description'] ?: '', - 'trigger' => sprintf('-PT%dM', $value), - ); - } + $valarms[] = array( + 'action' => $current['action'] ?: 'DISPLAY', + 'description' => $current['description'] ?: '', + 'trigger' => sprintf('-PT%dM', $value), + ); if (!empty($unsupported)) { $valarms = array_merge($valarms, $unsupported); @@ -590,5 +596,4 @@ return $valarms; } - }
View file
kolab-syncroton-2.3.2.tar.gz/lib/kolab_sync_data_email.php -> kolab-syncroton-2.3.3.tar.gz/lib/kolab_sync_data_email.php
Changed
@@ -137,7 +137,7 @@ switch ($name) { case 'internaldate': - $value = self::date_from_kolab(rcube_imap_generic::strToTime($headers->internaldate)); + $value = self::date_from_kolab(rcube_utils::strtotime($headers->internaldate)); break; case 'cc':
View file
kolab-syncroton-2.3.2.tar.gz/lib/kolab_sync_logger.php -> kolab-syncroton-2.3.3.tar.gz/lib/kolab_sync_logger.php
Changed
@@ -117,7 +117,7 @@ } } - $date = date($format); + $date = rcube_utils::date_format($format); $logline = sprintf("[%s]: [%s] %s\n", $date, $method, $message); if ($fp = @fopen($logfile, 'a')) {
View file
kolab-syncroton-2.3.3.tar.gz/tests/data_calendar.php
Added
@@ -0,0 +1,88 @@ +<?php + +class data_calendar extends PHPUnit_Framework_TestCase +{ + /** + * Test for kolab_sync_data_calendar::from_kolab_alarm() + */ + function test_from_kolab_alarm() + { + $obj = new kolab_sync_data_calendar_test; + + $result = $obj->from_kolab_alarm(array()); + $this->assertSame(null, $result); + + $event = array('valarms' => array(array( + 'action' => 'DISPLAY', + 'trigger' => 'PT5M', + ))); + $result = $obj->from_kolab_alarm($event); + $this->assertSame(null, $result); + + $event = array('valarms' => array(array( + 'action' => 'DISPLAY', + 'trigger' => '-PT5M', + ))); + $result = $obj->from_kolab_alarm($event); + $this->assertSame(5, $result); + + $event = array('valarms' => array(array( + 'action' => 'DISPLAY', + 'trigger' => 'PT0M', + ))); + $result = $obj->from_kolab_alarm($event); + $this->assertSame(0, $result); + + $event = array('valarms' => array(array( + 'action' => 'DISPLAY', + 'trigger' => '-PT0M', + ))); + $result = $obj->from_kolab_alarm($event); + $this->assertSame(0, $result); + + $event = array('valarms' => array(array( + 'action' => 'DISPLAY', + 'trigger' => 'PT0S', + ))); + $result = $obj->from_kolab_alarm($event); + $this->assertSame(0, $result); + } + + /** + * Test for kolab_sync_data_calendar::to_kolab_alarm() + */ + function test_to_kolab_alarm() + { + $obj = new kolab_sync_data_calendar_test; + + $result = $obj->to_kolab_alarm(null, array()); + $this->assertSame(array(), $result); + + $result = $obj->to_kolab_alarm(0, array()); + $this->assertSame('-PT0M', $result[0]['trigger']); + + $result = $obj->to_kolab_alarm(15, array()); + $this->assertSame('-PT15M', $result[0]['trigger']); + $this->assertSame('DISPLAY', $result[0]['action']); + } +} + +/** + * kolab_sync_data_calendar wrapper, so we can test protected methods too + */ +class kolab_sync_data_calendar_test extends kolab_sync_data_calendar +{ + function __construct() + { + } + + public function from_kolab_alarm($value) + { + return parent::from_kolab_alarm($value); + } + + public function to_kolab_alarm($value, $event) + { + return parent::to_kolab_alarm($value, $event); + } +}
View file
kolab-syncroton-2.3.2.tar.gz/tests/phpunit.xml -> kolab-syncroton-2.3.3.tar.gz/tests/phpunit.xml
Changed
@@ -5,6 +5,7 @@ <testsuite name="All Tests"> <file>body_converter.php</file> <file>data.php</file> + <file>data_calendar.php</file> <file>data_tasks.php</file> <file>message.php</file> <file>timezone_converter.php</file>
View file
kolab-syncroton.dsc
Changed
@@ -2,7 +2,7 @@ Source: kolab-syncroton Binary: kolab-syncroton Architecture: all -Version: 2.3.2-0~kolab1 +Version: 2.3.3~dev20160222-0~kolab1 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Uploaders: Paul Klos <kolab@klos2day.nl> Homepage: http://www.kolab.org/ @@ -12,5 +12,5 @@ Package-List: kolab-syncroton deb utils extra Files: - 00000000000000000000000000000000 0 kolab-syncroton-2.3.2.tar.gz + 00000000000000000000000000000000 0 kolab-syncroton-2.3.3.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
.