Changes of Revision 41
iRony.spec
Changed
x
1
2
%global upstream_version 0.4.8
3
4
Name: iRony
5
-Version: 0.4.8.2
6
+Version: 0.4.8.3
7
Release: 1%{?dist}
8
Summary: DAV for Kolab Groupware
9
10
debian.changelog
Changed
7
1
2
-irony (0.4.8.2-1~kolab1) unstable; urgency=low
3
+irony (0.4.8.3-1~kolab1) unstable; urgency=low
4
5
* New release
6
7
iRony-0.4.8.tar.gz/lib/Kolab/CalDAV/CalendarBackend.php
Changed
68
1
2
* Checks if specified message part is a vcalendar data
3
*
4
* @param rcube_message_part Part object
5
- * @return boolean True if part is of type vcard
6
+ *
7
+ * @return bool True if part is of type vcard
8
*/
9
protected static function part_is_itip($part)
10
{
11
12
* Parse the given iCal string into a hash array kolab_format_event can handle
13
*
14
* @param string iCal data block
15
+ *
16
* @return array Hash array with event properties or null on failure
17
*/
18
private function parse_calendar_data($calendarData, $uid)
19
20
/**
21
* Provide basic query for kolab_storage_folder::select()
22
*
23
- * @param boolean Filter for inbox events (i.e. status=NEEDS-ACTION)
24
+ * @param bool Filter for inbox events (i.e. status=NEEDS-ACTION)
25
+ *
26
* @return array List of query parameters for kolab_storage_folder::select()
27
*/
28
private function _event_filter_query($inbox = false)
29
30
/**
31
* Check the given event if it matches the filter
32
*
33
- * @param array Hash array with event properties
34
- * @param boolean Filter for inbox events (i.e. status=NEEDS-ACTION)
35
- * @return boolean True if matches, false if not
36
+ * @param array Hash array with event properties
37
+ * @param bool Filter for inbox events (i.e. status=NEEDS-ACTION)
38
+ *
39
+ * @return bool True if matches, false if not
40
*/
41
private function _event_filter_compare($event, $inbox = false)
42
{
43
44
$user_emails = $this->get_user_emails();
45
}
46
47
- if (is_array($event'attendees')) {
48
+ if (!empty($event'attendees') && is_array($event'attendees')) {
49
foreach ($event'attendees' as $attendee) {
50
if (in_array($attendee'email', $user_emails)) {
51
$status = !empty($attendee'status') ? $attendee'status' : null;
52
if ($status == 'DECLINED') {
53
return false;
54
}
55
- else if ($inbox && $status == 'NEEDS-ACTION') {
56
+ if ($inbox && $status == 'NEEDS-ACTION') {
57
return true;
58
}
59
}
60
61
* Generate an Etag string from the given event data
62
*
63
* @param array Hash array with event properties from libkolab
64
+ *
65
* @return string Etag string
66
*/
67
private static function _get_etag($event)
68
iRony-0.4.8.tar.gz/lib/Kolab/CardDAV/ContactsBackend.php
Changed
128
1
2
}
3
}
4
5
- foreach ((array)$contact'email' as $email) {
6
- $types = array('INTERNET');
7
- if (!empty($email'type'))
8
- $types = array_merge($types, explode(',', strtoupper($email'type')));
9
- $vc->add('EMAIL', $email'address', array('type' => $types));
10
+ if (!empty($contact'email')) {
11
+ foreach ((array)$contact'email' as $email) {
12
+ $types = array('INTERNET');
13
+ if (!empty($email'type'))
14
+ $types = array_merge($types, explode(',', strtoupper($email'type')));
15
+ $vc->add('EMAIL', $email'address', array('type' => $types));
16
+ }
17
}
18
19
- foreach ((array)$contact'phone' as $phone) {
20
- $type = $this->phonetypes$phone'type' ?: $phone'type';
21
- $params = !empty($type) ? array('type' => explode(',', strtoupper($type))) : array();
22
- $vc->add('TEL', $phone'number', $params);
23
+ if (!empty($contact'email')) {
24
+ foreach ((array)$contact'phone' as $phone) {
25
+ $type = $this->phonetypes$phone'type' ?? $phone'type';
26
+ $params = !empty($type) ? array('type' => explode(',', strtoupper($type))) : array();
27
+ $vc->add('TEL', $phone'number', $params);
28
+ }
29
}
30
31
- foreach ((array)$contact'website' as $website) {
32
- $params = !empty($website'type') ? array('type' => explode(',', strtoupper($website'type'))) : array();
33
- $vc->add('URL', $website'url', $params);
34
+ if (!empty($contact'website')) {
35
+ if (!empty($contact'website')) {
36
+ foreach ((array)$contact'website' as $website) {
37
+ $params = !empty($website'type') ? array('type' => explode(',', strtoupper($website'type'))) : array();
38
+ $vc->add('URL', $website'url', $params);
39
+ }
40
+ }
41
}
42
43
- $improtocolmap = array_flip($this->improtocols);
44
- foreach ((array)$contact'im' as $im) {
45
- list($prot, $val) = explode(':', $im, 2);
46
- if ($val && !$v4) $vc->add('x-' . ($improtocolmap$prot ?: $prot), $val);
47
- else $vc->add('IMPP', $im);
48
+ if (!empty($contact'im')) {
49
+ $improtocolmap = array_flip($this->improtocols);
50
+ foreach ((array)$contact'im' as $im) {
51
+ list($prot, $val) = explode(':', $im, 2);
52
+ if ($val && !$v4) $vc->add('x-' . ($improtocolmap$prot ?: $prot), $val);
53
+ else $vc->add('IMPP', $im);
54
+ }
55
}
56
57
- foreach ((array)$contact'address' as $adr) {
58
- $params = !empty($adr'type') ? array('type' => strtoupper($adr'type')) : array();
59
- $vadr = $vc->create('ADR', null, $params);
60
- $vadr->setParts(array('','', $adr'street', $adr'locality', $adr'region', $adr'code', $adr'country'));
61
- $vc->add($vadr);
62
+ if (!empty($contact'address')) {
63
+ foreach ((array)$contact'address' as $adr) {
64
+ $params = !empty($adr'type') ? array('type' => strtoupper($adr'type')) : array();
65
+ $vadr = $vc->create('ADR', null, $params);
66
+ $vadr->setParts(array('','', $adr'street', $adr'locality', $adr'region', $adr'code', $adr'country'));
67
+ $vc->add($vadr);
68
+ }
69
}
70
71
if (!empty($contact'notes'))
72
73
$vc->add('FBURL', $contact'freebusyurl');
74
}
75
76
- if (is_array($contact'lang')) {
77
+ if (!empty($contact'lang') && is_array($contact'lang')) {
78
foreach ($contact'lang' as $value) {
79
$vc->add('LANG', $value);
80
}
81
82
}
83
84
// add custom properties
85
- foreach ((array)$contact'x-custom' as $prop) {
86
- $vc->add($prop0, $prop1);
87
+ if (!empty($contact'x-custom')) {
88
+ foreach ((array)$contact'x-custom' as $prop) {
89
+ $vc->add($prop0, $prop1);
90
+ }
91
}
92
93
// send some known fields as itemN.X-AB* for Apple clients
94
95
/**
96
* Extract array values by a filter
97
*
98
- * @param array Array to filter
99
- * @param keys Array or comma separated list of values to keep
100
- * @param boolean Invert key selection: remove the listed values
101
+ * @param array $arr Array to filter
102
+ * @param array|string $values Array or comma separated list of values to keep
103
+ * @param bool $inverse Invert key selection: remove the listed values
104
*
105
* @return array The filtered array
106
*/
107
108
$values = explode(',', $values);
109
}
110
111
- // explode single, comma-separated value
112
- if (count($arr) == 1 && strpos($arr0, ',')) {
113
- $arr = explode(',', $arr0);
114
- }
115
-
116
$result = array();
117
$keep = array_flip((array)$values);
118
119
if (!empty($arr)) {
120
+ // explode single, comma-separated value
121
+ if (count($arr) == 1 && strpos($arr0, ',')) {
122
+ $arr = explode(',', $arr0);
123
+ }
124
+
125
foreach ($arr as $key => $val) {
126
if ($inverse != isset($keepstrtolower($val))) {
127
$result$key = $val;
128
iRony-0.4.8.tar.gz/public_html/index.php
Changed
16
1
2
3
if ($services'CALDAV') {
4
$caldav_backend = new \Kolab\CalDAV\CalendarBackend();
5
- $caldav_backend->setUserAgent($_SERVER'HTTP_USER_AGENT');
6
+ $caldav_backend->setUserAgent($_SERVER'HTTP_USER_AGENT' ?? '');
7
$nodes = new \Kolab\CalDAV\CalendarRootNode($principal_backend, $caldav_backend);
8
}
9
if ($services'CARDDAV') {
10
$carddav_backend = new \Kolab\CardDAV\ContactsBackend();
11
- $carddav_backend->setUserAgent($_SERVER'HTTP_USER_AGENT');
12
+ $carddav_backend->setUserAgent($_SERVER'HTTP_USER_AGENT' ?? '');
13
$nodes = new \Kolab\CardDAV\AddressBookRoot($principal_backend, $carddav_backend);
14
}
15
if ($services'WEBDAV') {
16
iRony.dsc
Changed
10
1
2
Source: irony
3
Binary: irony
4
Architecture: all
5
-Version: 1:0.4.8.2-1~kolab1
6
+Version: 1:0.4.8.3-1~kolab1
7
Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>
8
Uploaders: Paul Klos <kolab@klos2day.nl>
9
Homepage: http://www.kolab.org/
10