Changeset 6055 in subversion


Ignore:
Timestamp:
Apr 10, 2012 3:47:15 AM (14 months ago)
Author:
alec
Message:
  • Fix removing all folders on import to LDAP addressbook (added rcube_ldap::delete_all())
  • Fix removing sub-entries in delete()
Location:
trunk/roundcubemail
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r6054 r6055  
    22=========================== 
    33 
     4- Fix removing all folders on import to LDAP addressbook 
    45- Fix so "Back" from compose/show doesn't reset search request (#1488238) 
    56- Add option to delete messages instead of moving to Trash when in Junk folder (#1486686) 
  • trunk/roundcubemail/program/include/rcube_ldap.php

    r6047 r6055  
    12851285            // Need to delete all sub-entries first 
    12861286            if ($this->sub_filter) { 
    1287                 if ($entries = $this->ldap_list($dn, $this->sub_filter, array_keys($this->props['sub_fields']))) { 
     1287                if ($entries = $this->ldap_list($dn, $this->sub_filter)) { 
    12881288                    foreach ($entries as $entry) { 
    12891289                        if (!$this->ldap_delete($entry['dn'])) { 
     
    13121312 
    13131313        return count($ids); 
     1314    } 
     1315 
     1316 
     1317    /** 
     1318     * Remove all contact records 
     1319     */ 
     1320    function delete_all() 
     1321    { 
     1322        //searching for contact entries 
     1323        $dn_list = $this->ldap_list($this->base_dn, $this->prop['filter'] ? $this->prop['filter'] : '(objectclass=*)'); 
     1324 
     1325        if (!empty($dn_list)) { 
     1326            foreach ($dn_list as $idx => $entry) { 
     1327                $dn_list[$idx] = self::dn_encode($entry['dn']); 
     1328            } 
     1329            $this->delete($dn_list); 
     1330        } 
    13141331    } 
    13151332 
     
    21732190     * Wrapper for ldap_list() 
    21742191     */ 
    2175     protected function ldap_list($dn, $filter, $attrs) 
     2192    protected function ldap_list($dn, $filter, $attrs = array('')) 
    21762193    { 
    21772194        $list = array(); 
Note: See TracChangeset for help on using the changeset viewer.