thomascube
2011-12-04 b885ab73b81d344125b41115a885c9ada40386bc
Fix saving of composite address fields without subtype

1 files modified
8 ■■■■■ changed files
program/steps/addressbook/save.inc 8 ●●●●● patch | view | raw | blame | history
program/steps/addressbook/save.inc
@@ -50,10 +50,12 @@
      foreach ((array)$vals as $i => $val)
        $values[$i][$childcol] = $val;
    }
    $subtypes = get_input_value('_subtype_' . $col, RCUBE_INPUT_POST);
    foreach ($subtypes as $i => $subtype)
    $subtypes = isset($_REQUEST['_subtype_' . $col]) ? (array)get_input_value('_subtype_' . $col, RCUBE_INPUT_POST) : array('');
    foreach ($subtypes as $i => $subtype) {
      $suffix = $subtype ? ':'.$subtype : '';
      if ($values[$i])
        $a_record[$col.':'.$subtype][] = $values[$i];
        $a_record[$col.$suffix][] = $values[$i];
     }
  }
  // assign values and subtypes
  else if (is_array($_POST[$fname])) {