diff options
| author | fisharebest <fisharebest@gmail.com> | 2013-07-06 06:50:17 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2013-07-06 06:50:17 +0000 |
| commit | c65e9092d1636b1db56e0ffd61d39b24a3c797c1 (patch) | |
| tree | d62cce1d0ac824cfba69e04a7caf3cc199788b0a | |
| parent | 1161456b266a50b3056fdaae59588feeb3af2a69 (diff) | |
| download | webtrees-c65e9092d1636b1db56e0ffd61d39b24a3c797c1.tar.gz webtrees-c65e9092d1636b1db56e0ffd61d39b24a3c797c1.tar.bz2 webtrees-c65e9092d1636b1db56e0ffd61d39b24a3c797c1.zip | |
edit-interface - add new child
| -rw-r--r-- | edit_interface.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/edit_interface.php b/edit_interface.php index fd64f9b7b7..e4de0269ef 100644 --- a/edit_interface.php +++ b/edit_interface.php @@ -1085,9 +1085,9 @@ case 'addchildaction': // Insert new child at the right place foreach ($family->getFacts('CHIL') as $fact) { $old_child = $fact->getTarget(); - if ($old_child && WT_Date::Compare($newchild->getEstimatedBirthDate(), $child->getEstimatedBirthDate())<0) { + if ($old_child && WT_Date::Compare($new_child->getEstimatedBirthDate(), $old_child->getEstimatedBirthDate())<0) { // Insert before this child - $family->updateFact($fact->fact_id, "1 CHIL @" . $new_child->getXref()."@\n" . $fact->getGedcom(), !$keep_chan); + $family->updateFact($fact->getFactId(), "1 CHIL @" . $new_child->getXref()."@\n" . $fact->getGedcom(), !$keep_chan); $done = true; break; } |
