diff --git a/addressbook/inc/class.addressbook_ads.inc.php b/addressbook/inc/class.addressbook_ads.inc.php index db06f14b03..ac04f29623 100644 --- a/addressbook/inc/class.addressbook_ads.inc.php +++ b/addressbook/inc/class.addressbook_ads.inc.php @@ -38,7 +38,7 @@ class addressbook_ads extends addressbook_ldap * Filter used for accounts addressbook * @var string */ - var $accountsFilter = '(objectclass=user)'; + var $accountsFilter = '(objectCategory=person)'; /** * Attribute used for DN @@ -70,7 +70,6 @@ class addressbook_ads extends addressbook_ldap */ function __construct(array $ldap_config=null, $ds=null) { - //$this->db_data_cols = $this->stock_contact_fields + $this->non_contact_fields; $this->accountName = $GLOBALS['egw_info']['user']['account_lid']; if ($ldap_config) diff --git a/addressbook/inc/class.addressbook_groupdav.inc.php b/addressbook/inc/class.addressbook_groupdav.inc.php index 41cb677788..16d97551ba 100644 --- a/addressbook/inc/class.addressbook_groupdav.inc.php +++ b/addressbook/inc/class.addressbook_groupdav.inc.php @@ -642,7 +642,7 @@ class addressbook_groupdav extends groupdav_handler * * @param array $contact * @param array|false $oldContact - * @param int|boolean $list_id or false on error + * @return int|boolean $list_id or false on error */ function save_group(array &$contact, $oldContact=null) { diff --git a/addressbook/inc/class.addressbook_ldap.inc.php b/addressbook/inc/class.addressbook_ldap.inc.php index dc13a4917d..445b67a570 100644 --- a/addressbook/inc/class.addressbook_ldap.inc.php +++ b/addressbook/inc/class.addressbook_ldap.inc.php @@ -705,15 +705,7 @@ class addressbook_ldap */ function &search($criteria,$only_keys=True,$order_by='',$extra_cols='',$wildcard='',$empty=False,$op='AND',$start=false,$filter=null,$join='',$need_full_no_count=false) { - #$order_by = explode(',',$order_by); - #$order_by = explode(' ',$order_by); - #$sort = $order_by[0]; - #$order = $order_by[1]; - #$query = $criteria; - #$fields = $only_keys ? ($only_keys === true ? $this->contacts_id : $only_keys) : ''; - #$limit = $need_full_no_count ? 0 : $GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs']; - #return parent::read($start,$limit,$fields,$query,$filter,$sort,$order); - + error_log(__METHOD__."(".array2string($criteria).", ".array2string($only_keys).", '$order_by', ".array2string($extra_cols).", '$wildcard', '$empty', '$op', ".array2string($start).", ".array2string($filter).")"); if((int)$filter['owner']) { if (!($accountName = $GLOBALS['egw']->accounts->id2name($filter['owner']))) return false; @@ -754,7 +746,7 @@ class addressbook_ldap // exclude expired accounts //$shadowExpireNow = floor((time()+date('Z'))/86400); //$objectFilter .= "(|(!(shadowExpire=*))(shadowExpire>=$shadowExpireNow))"; - // shadowExpire>= does NOT work, as shadow schema only specifies intergerMatch and not integerOrderingMatch :-( + // shadowExpire>= does NOT work, as shadow schema only specifies integerMatch and not integerOrderingMatch :-( $searchFilter = ''; if(is_array($criteria) && count($criteria) > 0) @@ -952,9 +944,9 @@ class addressbook_ldap $_attributes[] = 'creatorsName'; $_attributes[] = 'modifiersName'; - //echo "

ldap_search($this->ds, '$_ldapContext', '$_filter', ".array2string($_attributes).", 0, $this->ldapLimit)

\n"; + //error_log(__METHOD__."('$_ldapContext', '$_filter', ".array2string($_attributes).", $_addressbooktype)"); - if($_addressbooktype == ADDRESSBOOK_ALL) + if($_addressbooktype == ADDRESSBOOK_ALL || $_ldapContext == $this->allContactsDN) { $result = ldap_search($this->ds, $_ldapContext, $_filter, $_attributes, 0, $this->ldapLimit); } @@ -963,6 +955,7 @@ class addressbook_ldap $result = @ldap_list($this->ds, $_ldapContext, $_filter, $_attributes, 0, $this->ldapLimit); } if(!$result || !$entries = ldap_get_entries($this->ds, $result)) return array(); + //error_log(__METHOD__."('$_ldapContext', '$_filter', ".array2string($_attributes).", $_addressbooktype) result of $entries[count]"); $this->total = $entries['count']; foreach($entries as $i => $entry)