mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
"removed all special handling for SOGo connector, as it is no longer required from version 0.9pre14 on.
Thanks to Ludovic Marcotte from Inverse."
This commit is contained in:
parent
273bd722e2
commit
01a3800b27
@ -37,6 +37,11 @@ class addressbook_groupdav extends groupdav_handler
|
||||
*/
|
||||
var $charset = 'utf-8';
|
||||
|
||||
/**
|
||||
* What attribute is used to construct the path, default id, can be uid too
|
||||
*/
|
||||
const PATH_ATTRIBUTE = 'id';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
@ -49,9 +54,6 @@ class addressbook_groupdav extends groupdav_handler
|
||||
parent::__construct($app,$debug,$base_uri);
|
||||
|
||||
$this->bo =& new addressbook_bo();
|
||||
|
||||
// SOGo Connector for Thunderbird has problems in some fields if charset is other then iso-8859-1!
|
||||
if (strpos($_SERVER['HTTP_USER_AGENT'],'Thunderbird') !== false) $this->charset = 'iso-8859-1';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -62,7 +64,7 @@ class addressbook_groupdav extends groupdav_handler
|
||||
*/
|
||||
static function get_path($contact)
|
||||
{
|
||||
return '/addressbook/'.$contact['uid'].'.vcf';
|
||||
return '/addressbook/'.$contact[self::PATH_ATTRIBUTE].'.vcf';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -198,12 +200,12 @@ class addressbook_groupdav extends groupdav_handler
|
||||
if (($id = array_pop($parts))) $ids[] = basename($id,'.vcf');
|
||||
}
|
||||
}
|
||||
if ($ids) $filters['uid'] = $ids;
|
||||
if ($ids) $filters[self::PATH_ATTRIBUTE] = $ids;
|
||||
if ($this->debug) error_log(__METHOD__."($path,,,$user) addressbook-multiget: ids=".implode(',',$ids));
|
||||
}
|
||||
elseif ($id)
|
||||
{
|
||||
$filters['uid'] = basename($id,'.vcf');
|
||||
$filters[self::PATH_ATTRIBUTE] = basename($id,'.vcf');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -255,12 +257,6 @@ class addressbook_groupdav extends groupdav_handler
|
||||
$contact['owner'] = $ok['owner'];
|
||||
$contact['private'] = $ok['private'];
|
||||
}
|
||||
// SOGo requires that we keep it's path, but sets a different name-part then the uid
|
||||
// we use there name-part as UID, to be able to allow it to access the contact again with that path
|
||||
elseif (strlen($id) > 20 && strpos($_SERVER['HTTP_USER_AGENT'],'Thunderbird'))
|
||||
{
|
||||
$contact['uid'] = basename($id,'.vcf');
|
||||
}
|
||||
if ($this->http_if_match) $contact['etag'] = self::etag2value($this->http_if_match);
|
||||
|
||||
if (!($save_ok = $this->bo->save($contact)))
|
||||
|
Loading…
Reference in New Issue
Block a user