|
|
|
@ -154,14 +154,14 @@ $database->action(function($database) {
|
|
|
|
|
for ($i = 0; $i < count($childObjects); $i++) {
|
|
|
|
|
if ($childObjects[$i]->getID() == $cid) {
|
|
|
|
|
$childObjects[$i]->setName($children['name'][$cid]);
|
|
|
|
|
$childObjects[$i]->setBirthday(null, $children['year'][$cid] . "-" . $children['month'][$cid] . "-00");
|
|
|
|
|
$childObjects[$i]->setBirthday(null, $children['year'][$cid] . "-" . $children['month'][$cid] . "-01");
|
|
|
|
|
$childObjects[$i]->setGraduated(empty($children['graduate'][$cid]) ? false : true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$child = new Child();
|
|
|
|
|
$child->setName($children['name'][$cid]);
|
|
|
|
|
$child->setBirthday(null, $children['year'][$cid] . "-" . $children['month'][$cid] . "-00");
|
|
|
|
|
$child->setBirthday(null, $children['year'][$cid] . "-" . $children['month'][$cid] . "-01");
|
|
|
|
|
$child->setGraduated(empty($children['graduate'][$cid]) ? false : true);
|
|
|
|
|
$child->setFamilyID($family->getID());
|
|
|
|
|
$childObjects[] = $child;
|
|
|
|
|