* CardDAV: disable category and class (public/private) for iOS, because they are not displayed and get messed up

This commit is contained in:
Ralf Becker 2012-07-31 16:18:26 +00:00
parent 7986d3cb14
commit 082372881d
2 changed files with 10 additions and 1 deletions

View File

@ -518,6 +518,7 @@ class addressbook_groupdav extends groupdav_handler
$contact['carddav_name'] = $oldContact['carddav_name']; $contact['carddav_name'] = $oldContact['carddav_name'];
$contact['tid'] = $oldContact['tid']; $contact['tid'] = $oldContact['tid'];
$contact['creator'] = $oldContact['creator']; $contact['creator'] = $oldContact['creator'];
$contact['created'] = $oldContact['created'];
$contact['account_id'] = $oldContact['account_id']; $contact['account_id'] = $oldContact['account_id'];
} }
else else
@ -735,13 +736,20 @@ class addressbook_groupdav extends groupdav_handler
$supportedFields['TEL;IPHONE'] = $databaseFields['TEL;IPHONE'] = array('tel_cell_private'); $supportedFields['TEL;IPHONE'] = $databaseFields['TEL;IPHONE'] = array('tel_cell_private');
unset($supportedFields['TEL;CELL;HOME']); unset($databaseFields['TEL;CELL;HOME']); unset($supportedFields['TEL;CELL;HOME']); unset($databaseFields['TEL;CELL;HOME']);
$databaseFields['X-ABSHOWAS'] = $supportedFields['X-ABSHOWAS'] = array('fileas_type'); // Horde vCard class uses uppercase prop-names! $databaseFields['X-ABSHOWAS'] = $supportedFields['X-ABSHOWAS'] = array('fileas_type'); // Horde vCard class uses uppercase prop-names!
// Apple Addressbook pre Lion (OS X 10.7) messes up CLASS and CATEGORIES (Lion cant set them but leaves them alone) // Apple Addressbook pre Lion (OS X 10.7) messes up CLASS and CATEGORIES (Lion cant set them but leaves them alone)
if (preg_match('|CFNetwork/([0-9]+)|i', $_SERVER['HTTP_USER_AGENT'],$matches) && $matches[1] < 520) if (preg_match('|CFNetwork/([0-9]+)|i', $_SERVER['HTTP_USER_AGENT'],$matches) && $matches[1] < 520 ||
// iOS 5.1.1 does not display CLASS or CATEGORY, but wrongly escapes multiple, comma-separated categories
// and appends CLASS: PUBLIC to an empty NOTE: field --> leaving them out for iOS
$this->agent == 'dataaccess')
{ {
unset($supportedFields['CLASS']); unset($supportedFields['CLASS']);
unset($databaseFields['CLASS']); unset($databaseFields['CLASS']);
unset($supportedFields['CATEGORIES']); unset($supportedFields['CATEGORIES']);
unset($databaseFields['CATEGORIES']); unset($databaseFields['CATEGORIES']);
}
if (preg_match('|CFNetwork/([0-9]+)|i', $_SERVER['HTTP_USER_AGENT'],$matches) && $matches[1] < 520)
{
// gd cant parse or resize images stored from snow leopard addressbook: gd-jpeg: // gd cant parse or resize images stored from snow leopard addressbook: gd-jpeg:
// - JPEG library reports unrecoverable error // - JPEG library reports unrecoverable error
// - Passed data is not in 'JPEG' format // - Passed data is not in 'JPEG' format

View File

@ -80,6 +80,7 @@ class addressbook_tracking extends bo_tracking
unset($this->field2history['modifier']); unset($this->field2history['modifier']);
unset($this->field2history['etag']); unset($this->field2history['etag']);
unset($this->field2history['creator']); unset($this->field2history['creator']);
unset($this->field2history['created']);
unset($this->field2history['tz']); unset($this->field2history['tz']);
// we currently can only track text // we currently can only track text