Changeset 5540 in subversion


Ignore:
Timestamp:
Dec 4, 2011 11:57:40 AM (19 months ago)
Author:
thomasb
Message:

Fix saving of composite address fields without subtype

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/steps/addressbook/save.inc

    r5406 r5540  
    5151        $values[$i][$childcol] = $val; 
    5252    } 
    53     $subtypes = get_input_value('_subtype_' . $col, RCUBE_INPUT_POST); 
    54     foreach ($subtypes as $i => $subtype) 
     53    $subtypes = isset($_REQUEST['_subtype_' . $col]) ? (array)get_input_value('_subtype_' . $col, RCUBE_INPUT_POST) : array(''); 
     54    foreach ($subtypes as $i => $subtype) { 
     55      $suffix = $subtype ? ':'.$subtype : ''; 
    5556      if ($values[$i]) 
    56         $a_record[$col.':'.$subtype][] = $values[$i]; 
     57        $a_record[$col.$suffix][] = $values[$i]; 
     58     } 
    5759  } 
    5860  // assign values and subtypes 
Note: See TracChangeset for help on using the changeset viewer.