diff options
| author | Greg Roach <fisharebest@gmail.com> | 2013-09-21 08:56:14 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2013-09-21 08:56:14 +0100 |
| commit | f262b505a3c8fad08b03918cf703ffd4b0ae81e1 (patch) | |
| tree | ae28da795113509bb2c9be553a7ad06b85970d81 /library | |
| parent | 54c9c1e5188bb133956107dc695ee3f470fc3e5a (diff) | |
| download | webtrees-f262b505a3c8fad08b03918cf703ffd4b0ae81e1.tar.gz webtrees-f262b505a3c8fad08b03918cf703ffd4b0ae81e1.tar.bz2 webtrees-f262b505a3c8fad08b03918cf703ffd4b0ae81e1.zip | |
#1225751 - Missing ged Param in some Charts
Diffstat (limited to 'library')
| -rw-r--r-- | library/WT/Controller/Descendancy.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/library/WT/Controller/Descendancy.php b/library/WT/Controller/Descendancy.php index e6074a50da..fd554a9a7b 100644 --- a/library/WT/Controller/Descendancy.php +++ b/library/WT/Controller/Descendancy.php @@ -252,4 +252,34 @@ class WT_Controller_Descendancy extends WT_Controller_Chart { echo '</ul>'; echo '</li>'; } + + public function indi_desc($person, $n, $array) { + if ($n < 1) { + return $array; + } + $array[$person->getXref()]=$person; + foreach ($person->getSpouseFamilies() as $family) { + $spouse = $family->getSpouse($person); + if ($spouse) { + $array[$spouse->getXref()] = $spouse; + } + foreach ($family->getChildren() as $child) { + $array = $this->indi_desc($child, $n-1, $array); + } + } + return $array; + } + + public function fam_desc($person, $n, $array) { + if ($n < 1) { + return $array; + } + foreach ($person->getSpouseFamilies() as $family) { + $array[$family->getXref()]=$family; + foreach ($family->getChildren() as $child) { + $array = $this->fam_desc($child, $n-1, $array); + } + } + return $array; + } } |
