diff options
| author | fisharebest <fisharebest@gmail.com> | 2013-06-30 11:25:29 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2013-06-30 11:25:29 +0000 |
| commit | 7b2e58b921e3e240f4609e15b0fe761296c745b0 (patch) | |
| tree | 870b5a83241b611d2d97dd20cf4eb232029d0791 /modules_v3 | |
| parent | 42efeb5d4774255c9af7a11ef7cd6a9c948a8035 (diff) | |
| download | webtrees-7b2e58b921e3e240f4609e15b0fe761296c745b0.tar.gz webtrees-7b2e58b921e3e240f4609e15b0fe761296c745b0.tar.bz2 webtrees-7b2e58b921e3e240f4609e15b0fe761296c745b0.zip | |
More refactoring - census assistant
Diffstat (limited to 'modules_v3')
| -rw-r--r-- | modules_v3/GEDFact_assistant/_CENS/census_3_search_add.php | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/modules_v3/GEDFact_assistant/_CENS/census_3_search_add.php b/modules_v3/GEDFact_assistant/_CENS/census_3_search_add.php index 82a50c0ce6..74be99e3f0 100644 --- a/modules_v3/GEDFact_assistant/_CENS/census_3_search_add.php +++ b/modules_v3/GEDFact_assistant/_CENS/census_3_search_add.php @@ -104,24 +104,21 @@ if (!defined('WT_WEBTREES')) { $personcount=0; $families = $person->getChildFamilies(); foreach ($families as $family) { - $label = $person->getChildFamilyLabel($family); $people = $this->buildFamilyList($family, "parents", false); $marrdate = $family->getMarriageDate(); //-- Get Parents Children's Name, DOB, DOD -------------------------- - if (isset($people["children"])) { - $chBLDarray = Array(); - foreach ($people["children"] as $child) { - $chnam = $child->getAllNames(); - $chfulln = rtrim($chnam[0]['givn'],'*')." ".$chnam[0]['surname']; - $chfulln = str_replace("@N.N.", "(".WT_I18N::translate('unknown').")", $chfulln); - $chfulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $chfulln); - $chfulln = addslashes($chfulln); // Child's Full Name - $chdob = ($child->getBirthDate()->minJD()+$child->getBirthDate()->maxJD())/2; // Child's Date of Birth (Julian) - $chdod = ($child->getDeathDate()->minJD()+$child->getDeathDate()->maxJD())/2; // Child's Date of Death (Julian) - $chBLD = ($chfulln.", ".$chdob.", ".$chdod); - array_push($chBLDarray, $chBLD); - } + $chBLDarray = Array(); + foreach ($people["children"] as $child) { + $chnam = $child->getAllNames(); + $chfulln = rtrim($chnam[0]['givn'],'*')." ".$chnam[0]['surname']; + $chfulln = str_replace("@N.N.", "(".WT_I18N::translate('unknown').")", $chfulln); + $chfulln = str_replace("@P.N.", "(".WT_I18N::translate('unknown').")", $chfulln); + $chfulln = addslashes($chfulln); // Child's Full Name + $chdob = ($child->getBirthDate()->minJD()+$child->getBirthDate()->maxJD())/2; // Child's Date of Birth (Julian) + $chdod = ($child->getDeathDate()->minJD()+$child->getDeathDate()->maxJD())/2; // Child's Date of Death (Julian) + $chBLD = ($chfulln.", ".$chdob.", ".$chdod); + array_push($chBLDarray, $chBLD); } //-- Parents Husband ------------------- @@ -376,7 +373,6 @@ if (!defined('WT_WEBTREES')) { if (isset($people["children"])) { //-- Parent's Children's Details -------------------------------------- - $elderdate = $family->getMarriageDate(); foreach ($people["children"] as $child) { // Get Child's Children's Name DOB DOD ---- @@ -520,7 +516,6 @@ if (!defined('WT_WEBTREES')) { </tr> <?php } - $elderdate = $child->getBirthDate(false); } } @@ -528,11 +523,7 @@ if (!defined('WT_WEBTREES')) { //-- Build step families --------------------------------------------------- foreach ($person->getChildStepFamilies() as $family) { - $label = $person->getStepFamilyLabel($family); $people = $this->buildFamilyList($family, "step-parents", false); - if ($people) { - echo "<tr><td><br></td><td></td></tr>"; - } $marrdate = $family->getMarriageDate(); //-- Get Children's Name, DOB, DOD -------------------------- @@ -552,7 +543,6 @@ if (!defined('WT_WEBTREES')) { } // Step Husband ----------------------------- - $elderdate = ""; if (isset($people["husb"])) { //-- Step Husbands Parent Family -------------------------------------- @@ -679,7 +669,6 @@ if (!defined('WT_WEBTREES')) { </td> </tr> <?php - $elderdate = $people["husb"]->getBirthDate(false); } // Step Wife ------------------- @@ -824,7 +813,6 @@ if (!defined('WT_WEBTREES')) { // Step Children --------------------- if (isset($people["children"])) { - $elderdate = $family->getMarriageDate(); foreach ($people["children"] as $child) { // Get Child's Children @@ -946,7 +934,6 @@ if (!defined('WT_WEBTREES')) { </td> </tr> <?php - //$elderdate = $child->getBirthDate(false); } } } |
