Changes of Revision 26
kolab-syncroton.spec
Changed
x
1
2
%global upstream_version 2.4.2
3
4
Name: kolab-syncroton
5
-Version: 2.4.2.2
6
+Version: 2.4.2.3
7
Release: 1%{?dist}
8
Summary: ActiveSync for Kolab Groupware
9
10
debian.changelog
Changed
7
1
2
-kolab-syncroton (2.4.2.2-0~kolab1) unstable; urgency=low
3
+kolab-syncroton (2.4.2.3-0~kolab1) unstable; urgency=low
4
5
* Release version 2.4.2
6
7
kolab-syncroton-2.4.2.tar.gz/lib/kolab_sync_data_email.php
Changed
47
1
2
public static function encodeGlobalObjId(array $data): string
3
{
4
$classid = "040000008200e00074c5b7101a82e008";
5
- $uid = $data'uid';
6
- $vcalid = "vCal-Uid\1\0\0\0{$uid}\0";
7
+ if (!empty($data'data')) {
8
+ $payload = $data'data';
9
+ } else {
10
+ $uid = $data'uid';
11
+ $payload = "vCal-Uid\1\0\0\0{$uid}\0";
12
+ }
13
14
$packed = pack(
15
"H32nCCPx8Va*",
16
17
$data'month' ?? 0,
18
$data'day' ?? 0,
19
$data'now' ?? 0,
20
- strlen($vcalid),
21
- $vcalid
22
+ strlen($payload),
23
+ $payload
24
);
25
26
return base64_encode($packed);
27
28
}
29
}
30
31
+ $fileTime = ($event'start'->getTimestamp() + 11644473600) * 10000000; // 1.1.1600 - 1.1.1970 difference in seconds. Converted to microseconds
32
+
33
// Kolab Format 3.0 and xCal does support timezone per-date, but ActiveSync allows
34
// only one timezone per-event. We'll use timezone of the start date
35
$meeting'timeZone' = kolab_sync_timezone_converter::encodeTimezoneFromDate($event'start');
36
- $meeting'globalObjId' = self::encodeGlobalObjId('uid' => $event'uid');
37
+ $meeting'globalObjId' = self::encodeGlobalObjId(
38
+ 'uid' => $event'uid',
39
+ 'year' => intval($event'start'->format('Y')),
40
+ 'month' => intval($event'start'->format('n')),
41
+ 'day' => intval($event'start'->format('j')),
42
+ 'now' => $fileTime,
43
+ );
44
45
// TODO handle other methods
46
if ($event'_method' == 'REQUEST') {
47
kolab-syncroton-2.4.2.tar.gz/tests/globalid_converter.php
Changed
20
1
2
$this->assertSame(2004, $output'year');
3
$this->assertSame(9, $output'month');
4
$this->assertSame(16, $output'day');
5
- //FIXME we don't currently implement non ical uids
6
- // $encoded = kolab_sync_data_email::encodeGlobalObjId($output);
7
- // $this->assertSame($encoded, $input);
8
+ $this->assertSame(127373090979660000, $output'now');
9
+
10
+ // This is how the "now" value is interpreted
11
+ // $winSecs = (int)($output'now' / 10000000); // convert microseconds to seconds
12
+ // $unixTimestamp = ($winSecs - 11644473600); // subtract 1.1.1600 - 1.1.1970 difference in seconds
13
+ // print(date(DateTime::RFC822, $unixTimestamp));
14
+
15
+ $encoded = kolab_sync_data_email::encodeGlobalObjId($output);
16
+ $this->assertSame($encoded, $input);
17
+ base64_decode($encoded);
18
}
19
}
20
kolab-syncroton.dsc
Changed
10
1
2
Source: kolab-syncroton
3
Binary: kolab-syncroton
4
Architecture: all
5
-Version: 1:2.4.2.2-1~kolab1
6
+Version: 1:2.4.2.3-1~kolab1
7
Maintainer: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com>
8
Uploaders: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com>
9
Homepage: http://www.kolab.org/
10