- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
} else {
if (is_array($v))
foreach ($v as $kk => $vv) {
if (null != $vv) {
$empty = true;
if (is_array($vv)) {
if (sizeof($vv) > 0) {
$empty = false;
}
} else {
$vv = trim($vv);
if (isset($vv{0})) {
$empty = false;
}
}
if (false === $empty) {
if (in_array($kk, $keys)) {
if (empty($fields[$kk]))
continue;
$fld = $fields[$kk];
$val = $this->getTable('field-value')->createRow(array(
'entity_id' => $id
, 'entity_type_id' => $entityTypeId
, 'field_id' => $fld['id']
, 'value_' . $fld['type_name'] => $this->_typedValue($vv, $fld['type_name'])
, 'step' => $step
));
$val->save();
if (($entity_id == null) || ($entity_id = '')) {
$entity_id = $id;
}
}
}
}
}
}
}
}
}
}
Govnisti_Diavol 03.03.2012 00:42 # +2
Kostcev_Tolya 03.03.2012 04:52 # 0
lazyBolt 03.03.2012 21:20 # −3
guest 23.03.2012 13:07 # +1
Очень надежно :D Нахуя?
guest8 09.04.2019 12:47 # −999