Projects
Kolab:3.4:Updates
iRony
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 23
View file
roundcubemail-plugins-kolab-3.0.2-2208-all-day-events.patch
Deleted
@@ -1,35 +0,0 @@ -commit dc7d0857d1f75c1644296dd2d59892559b80c371 -Author: Thomas Bruederli <bruederli@kolabsys.com> -Date: Thu Sep 12 10:01:56 2013 +0200 - - Fix exporting of all-day events (#2208); The custom _dateonly flag doesn't survive serialization in kolab_cache - -diff --git a/plugins/libcalendaring/libvcalendar.php b/plugins/libcalendaring/libvcalendar.php -index 6de8feb..cabbb65 100644 ---- a/plugins/libcalendaring/libvcalendar.php -+++ b/plugins/libcalendaring/libvcalendar.php -@@ -543,10 +543,10 @@ class libvcalendar - * @param string Property name - * @param object DateTime - */ -- public static function datetime_prop($name, $dt, $utc = false) -+ public static function datetime_prop($name, $dt, $utc = false, $dateonly = null) - { - $vdt = new VObject\Property\DateTime($name); -- $vdt->setDateTime($dt, $dt->_dateonly ? VObject\Property\DateTime::DATE : -+ $vdt->setDateTime($dt, $dt->_dateonly || $dateonly ? VObject\Property\DateTime::DATE : - ($utc ? VObject\Property\DateTime::UTC : VObject\Property\DateTime::LOCALTZ)); - return $vdt; - } -@@ -645,9 +645,9 @@ class libvcalendar - if (!empty($event['changed'])) - $ve->add(self::datetime_prop('DTSTAMP', $event['changed'], true)); - if (!empty($event['start'])) -- $ve->add(self::datetime_prop('DTSTART', $event['start'], false)); -+ $ve->add(self::datetime_prop('DTSTART', $event['start'], false, $event['allday'])); - if (!empty($event['end'])) -- $ve->add(self::datetime_prop('DTEND', $event['end'], false)); -+ $ve->add(self::datetime_prop('DTEND', $event['end'], false, $event['allday'])); - if (!empty($event['due'])) - $ve->add(self::datetime_prop('DUE', $event['due'], false)); -
View file
roundcubemail-plugins-kolab-3.0.2-apple-commas-in-location.patch
Deleted
@@ -1,135 +0,0 @@ -commit c72b4b362cb19887652e2c641cd9e80c4fe312e9 -Author: Thomas Bruederli <bruederli@kolabsys.com> -Date: Thu Sep 12 10:57:22 2013 +0200 - - Work-around Apple's non-standard handling of commas in location property - -diff --git a/plugins/libcalendaring/libvcalendar.php b/plugins/libcalendaring/libvcalendar.php -index cabbb65..845cfbd 100644 ---- a/plugins/libcalendaring/libvcalendar.php -+++ b/plugins/libcalendaring/libvcalendar.php -@@ -41,6 +41,7 @@ class libvcalendar - private $attendee_keymap = array('name' => 'CN', 'status' => 'PARTSTAT', 'role' => 'ROLE', 'cutype' => 'CUTYPE', 'rsvp' => 'RSVP'); - - public $method; -+ public $agent = ''; - public $objects = array(); - public $freebusy = array(); - -@@ -83,6 +84,14 @@ class libvcalendar - } - - /** -+ * Setter for a user-agent string to tweak input/output accordingly -+ */ -+ public function set_agent($agent) -+ { -+ $this->agent = $agent; -+ } -+ -+ /** - * Free resources by clearing member vars - */ - public function reset() -@@ -151,6 +160,7 @@ class libvcalendar - - if ($vobject->name == 'VCALENDAR') { - $this->method = strval($vobject->METHOD); -+ $this->agent = strval($vobject->PRODID); - - foreach ($vobject->getBaseComponents() as $ve) { - if ($ve->name == 'VEVENT' || $ve->name == 'VTODO') { -@@ -195,6 +205,16 @@ class libvcalendar - } - - /** -+ * Helper method to determine whether the connected client is an Apple device -+ */ -+ private function is_apple() -+ { -+ return stripos($this->agent, 'Apple') !== false -+ || stripos($this->agent, 'Mac OS X') !== false -+ || stripos($this->agent, 'iOS/') !== false; -+ } -+ -+ /** - * Convert the given VEvent object to a libkolab compatible array representation - * - * @param object Vevent object to convert -@@ -290,8 +310,14 @@ class libvcalendar - $event['complete'] = intval($prop->value); - break; - -- case 'DESCRIPTION': - case 'LOCATION': -+ case 'DESCRIPTION': -+ if ($this->is_apple()) { -+ $event[strtolower($prop->name)] = str_replace('\,', ',', $prop->value); -+ break; -+ } -+ // else: fall through -+ - case 'URL': - $event[strtolower($prop->name)] = $prop->value; - break; -@@ -657,7 +683,7 @@ class libvcalendar - $ve->add('SUMMARY', $event['title']); - - if ($event['location']) -- $ve->add('LOCATION', $event['location']); -+ $ve->add($this->is_apple() ? new vobject_location_property('LOCATION', $event['location']) : new VObject\Property('LOCATION', $event['location'])); - if ($event['description']) - $ve->add('DESCRIPTION', strtr($event['description'], array("\r\n" => "\n", "\r" => "\n"))); // normalize line endings - -@@ -807,3 +833,51 @@ class libvcalendar - } - - } -+ -+/** -+ * Override Sabre\VObject\Property that quotes commas in the location property -+ * because Apple clients treat that property as list. -+ */ -+class vobject_location_property extends VObject\Property -+{ -+ /** -+ * Turns the object back into a serialized blob. -+ * -+ * @return string -+ */ -+ public function serialize() -+ { -+ $str = $this->name; -+ -+ foreach ($this->parameters as $param) { -+ $str.=';' . $param->serialize(); -+ } -+ -+ $src = array( -+ '\\', -+ "\n", -+ ',', -+ ); -+ $out = array( -+ '\\\\', -+ '\n', -+ '\,', -+ ); -+ $str.=':' . str_replace($src, $out, $this->value); -+ -+ $out = ''; -+ while (strlen($str) > 0) { -+ if (strlen($str) > 75) { -+ $out.= mb_strcut($str, 0, 75, 'utf-8') . "\r\n"; -+ $str = ' ' . mb_strcut($str, 75, strlen($str), 'utf-8'); -+ } else { -+ $out.= $str . "\r\n"; -+ $str = ''; -+ break; -+ } -+ } -+ -+ return $out; -+ } -+} -+
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
.