Changeset 0f1faec in github


Ignore:
Timestamp:
Aug 11, 2011 6:24:29 PM (23 months ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
a170304
Parents:
077cfda
Message:

Fix saving and deleting LDAP contacts; skip client-side input validation for contacts, this is done server-side

Location:
program
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube_ldap.php

    r4d9f620 r0f1faec  
    729729        $replacedata = array(); 
    730730        $deletedata = array(); 
     731         
     732        // flatten composite fields in $record 
     733        if (is_array($record['address'])) { 
     734          foreach ($record['address'] as $i => $struct) { 
     735            foreach ($struct as $col => $val) { 
     736              $record[$col][$i] = $val; 
     737            } 
     738          } 
     739        } 
    731740 
    732741        foreach ($this->fieldmap as $col => $fld) { 
     
    844853        if (!is_array($ids)) { 
    845854            // Not an array, break apart the encoded DNs. 
    846             $dns = explode(',', $ids); 
     855            $ids = explode(',', $ids); 
    847856        } // end if 
    848857 
    849         foreach ($dns as $id) { 
     858        foreach ($ids as $id) { 
    850859            $dn = base64_decode($id); 
    851860            $this->_debug("C: Delete [dn: $dn]"); 
     
    870879        } // end foreach 
    871880 
    872         return count($dns); 
     881        return count($ids); 
    873882    } 
    874883 
  • program/js/app.js

    r1871993 r0f1faec  
    643643              form.action += '?_reload=1'; 
    644644            } 
    645             else if ((input = $("input[name='_name']", form)) &&input.length && input.val() == '') { 
    646               alert(this.get_label('nonamewarning')); 
    647               input.focus(); 
    648               break; 
    649             } 
    650645            else if (this.task == 'settings' && (this.env.identities_level % 2) == 0  && 
    651646              (input = $("input[name='_email']", form)) && input.length && !rcube_check_email(input.val()) 
     
    44284423  { 
    44294424    var n, buttons = this.buttons['upload-photo']; 
    4430     for (n=0; n < buttons.length; n++) 
     4425    for (n=0; n < buttons && buttons.length; n++) 
    44314426      $('#'+buttons[n].id).html(this.get_label(id == '-del-' ? 'addphoto' : 'replacephoto')); 
    44324427 
Note: See TracChangeset for help on using the changeset viewer.