From f7f9340cef76ed6a389cdf4a2136d87d429fd4c4 Mon Sep 17 00:00:00 2001 From: fisharebest Date: Mon, 5 Dec 2011 22:33:32 +0000 Subject: #900273 - Default person in charts --- library/WT/Controller/Pedigree.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'library/WT/Controller/Pedigree.php') diff --git a/library/WT/Controller/Pedigree.php b/library/WT/Controller/Pedigree.php index 34269437fb..3cddb105e8 100644 --- a/library/WT/Controller/Pedigree.php +++ b/library/WT/Controller/Pedigree.php @@ -83,11 +83,11 @@ class WT_Controller_Pedigree extends WT_Controller_Chart { $show_full = $this->show_full; $talloffset = $this->talloffset; - // Validate parameters - $this->rootid=check_rootid($this->rootid); - $this->rootPerson = WT_Person::getInstance($this->rootid); - if (is_null($this->rootPerson)) $this->rootPerson = new WT_Person(''); + if (!$this->rootPerson) { + $this->rootPerson=$this->getSignificantIndividual(); + $this->rootid=$this->rootPerson->getXref(); + } $this->name = $this->rootPerson->getFullName(); $this->addname = $this->rootPerson->getAddName(); -- cgit v1.3