Fix child birthdate bug
This commit is contained in:
parent
5c90ae4b76
commit
2c1b68a225
@ -180,14 +180,14 @@ switch ($VARS['action']) {
|
|||||||
for ($i = 0; $i < count($childObjects); $i++) {
|
for ($i = 0; $i < count($childObjects); $i++) {
|
||||||
if ($childObjects[$i]->getID() == $cid) {
|
if ($childObjects[$i]->getID() == $cid) {
|
||||||
$childObjects[$i]->setName($children['name'][$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);
|
$childObjects[$i]->setGraduated(empty($children['graduate'][$cid]) ? false : true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$child = new Child();
|
$child = new Child();
|
||||||
$child->setName($children['name'][$cid]);
|
$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->setGraduated(empty($children['graduate'][$cid]) ? false : true);
|
||||||
$child->setFamilyID($family->getID());
|
$child->setFamilyID($family->getID());
|
||||||
$childObjects[] = $child;
|
$childObjects[] = $child;
|
||||||
|
@ -154,14 +154,14 @@ $database->action(function($database) {
|
|||||||
for ($i = 0; $i < count($childObjects); $i++) {
|
for ($i = 0; $i < count($childObjects); $i++) {
|
||||||
if ($childObjects[$i]->getID() == $cid) {
|
if ($childObjects[$i]->getID() == $cid) {
|
||||||
$childObjects[$i]->setName($children['name'][$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);
|
$childObjects[$i]->setGraduated(empty($children['graduate'][$cid]) ? false : true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$child = new Child();
|
$child = new Child();
|
||||||
$child->setName($children['name'][$cid]);
|
$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->setGraduated(empty($children['graduate'][$cid]) ? false : true);
|
||||||
$child->setFamilyID($family->getID());
|
$child->setFamilyID($family->getID());
|
||||||
$childObjects[] = $child;
|
$childObjects[] = $child;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user