diff options
| author | Greg Roach <fisharebest@gmail.com> | 2014-10-15 17:06:49 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2014-10-15 17:06:49 +0100 |
| commit | da34599d20d2ca753d760810e3c4a5ff4b64bbe6 (patch) | |
| tree | 5decfb4a0b80eb33f74bbb491246a00156a10f04 /library/WT/Controller/Pedigree.php | |
| parent | 330bcfa2560ec39bb8a32c68c8e1925c47e60071 (diff) | |
| download | webtrees-da34599d20d2ca753d760810e3c4a5ff4b64bbe6.tar.gz webtrees-da34599d20d2ca753d760810e3c4a5ff4b64bbe6.tar.bz2 webtrees-da34599d20d2ca753d760810e3c4a5ff4b64bbe6.zip | |
Remove some broken/unreachable code from the pedigree chart controller
Diffstat (limited to 'library/WT/Controller/Pedigree.php')
| -rw-r--r-- | library/WT/Controller/Pedigree.php | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/library/WT/Controller/Pedigree.php b/library/WT/Controller/Pedigree.php index 46a98d2a63..2cc0be73b9 100644 --- a/library/WT/Controller/Pedigree.php +++ b/library/WT/Controller/Pedigree.php @@ -225,11 +225,13 @@ class WT_Controller_Pedigree extends WT_Controller_Chart { if (($minyoffset==0)||($minyoffset>$this->offsetarray[$i]["y"])) $minyoffset = $this->offsetarray[$i]["y"]; } } - - $ydiff = $baseyoffset+35-$minyoffset; - $this->adjust_subtree(0, $ydiff); } + /** + * Get the name of the person at the root of the tree. + * + * @return string + */ function getPersonName() { if (is_null($this->root)) { return WT_I18N::translate('unknown'); @@ -237,20 +239,4 @@ class WT_Controller_Pedigree extends WT_Controller_Chart { return $this->root->getFullName(); } } - - function adjust_subtree($index, $diff) { - global $offsetarray, $treeid; - - $f = ($index*2)+1; //-- father index - $m = $f+1; //-- mother index - - if (empty($offsetarray[$index])) return; - $offsetarray[$index]["y"] += $diff; - if ($f<count($treeid)) { - adjust_subtree($f, $diff); - } - if ($m<count($treeid)) { - adjust_subtree($m, $diff); - } - } } |
