From: <ral...@us...> - 2013-06-29 11:42:04
|
Author: ralfbecker Date: Sat Jun 29 13:41:55 2013 New Revision: 42931 URL: http://svn.stylite.de/viewvc/egroupware?rev=42931&view=rev Log: fixed CardDAV for accounts in ADS Modified: trunk/addressbook/inc/class.addressbook_ads.inc.php trunk/addressbook/inc/class.addressbook_groupdav.inc.php Modified: trunk/addressbook/inc/class.addressbook_ads.inc.php URL: http://svn.stylite.de/viewvc/egroupware/trunk/addressbook/inc/class.addressbook_ads.inc.php?rev=42931&r1=42930&r2=42931&view=diff ============================================================================== --- trunk/addressbook/inc/class.addressbook_ads.inc.php (original) +++ trunk/addressbook/inc/class.addressbook_ads.inc.php Sat Jun 29 13:41:55 2013 @@ -108,15 +108,13 @@ // AD seems to use user, instead of inetOrgPerson unset($this->schema2egw['posixaccount']); - $this->schema2egw['user'] = $this->schema2egw['inetorgperson']; - $this->schema2egw['user'] += array( + $this->schema2egw['user'] = array_merge($this->schema2egw['inetorgperson'], array( 'account_id' => 'objectsid', - 'account_lid' => 'samaccountname', - 'contact_uid' => 'objectguid', + 'id' => 'objectguid', + 'uid' => 'objectguid', + 'n_fn' => 'displayname', // leave CN used in DN untouched 'accountexpires', 'useraccountcontrol', // needed to exclude deactivated or expired accounts - ); - $this->schema2egw['user']['n_fn'] = 'displayname'; // leave CN used in DN untouched - + )); foreach($this->schema2egw as $schema => $attributes) { $this->all_attributes = array_merge($this->all_attributes,array_values($attributes)); @@ -189,7 +187,7 @@ function _user2egw(&$contact, $data) { $contact['account_id'] = $this->accounts_ads->objectsid2account_id($data['objectsid']); - $contact['id'] = $contact['contact_uid'] = $this->accounts_ads->objectguid2str($data['objectguid']); + $contact['id'] = $contact['uid'] = $this->accounts_ads->objectguid2str($data['objectguid']); // ignore system accounts if ($contact['account_id'] < accounts_ads::MIN_ACCOUNT_ID) return false; Modified: trunk/addressbook/inc/class.addressbook_groupdav.inc.php URL: http://svn.stylite.de/viewvc/egroupware/trunk/addressbook/inc/class.addressbook_groupdav.inc.php?rev=42931&r1=42930&r2=42931&view=diff ============================================================================== --- trunk/addressbook/inc/class.addressbook_groupdav.inc.php (original) +++ trunk/addressbook/inc/class.addressbook_groupdav.inc.php Sat Jun 29 13:41:55 2013 @@ -74,8 +74,8 @@ // since 1.9.007 we allow clients to specify the URL when creating a new contact, as specified by CardDAV // LDAP does NOT have a carddav_name attribute --> stick with id mapped to LDAP attribute uid if (version_compare($GLOBALS['egw_info']['apps']['phpgwapi']['version'], '1.9.007', '<') || - $this->bo->contact_repository == 'ldap' || - $this->bo->account_repository == 'ldap' && strpos($_SERVER['REQUEST_URI'].'/','/addressbook-accounts/') !== false) + $this->bo->contact_repository != 'sql' || + $this->bo->account_repository != 'sql' && strpos($_SERVER['REQUEST_URI'].'/','/addressbook-accounts/') !== false) { groupdav_handler::$path_extension = '.vcf'; } |