$search);
$_SESSION['sb_descendancy_last'] = $last;
if (!empty($search)) return $this->search($search);
else if (!empty($pid)) return $this->loadSpouses($pid, 1);
else if (!empty($famid)) return $this->loadChildren($famid, 1);
}
// Implement WT_Module_Sidebar
public function getSidebarContent() {
global $WT_IMAGE_DIR, $WT_IMAGES;
$out = '
';
if ($this->controller) {
$root = null;
if ($this->controller->pid) {
$root = Person::getInstance($this->controller->pid);
}
else if ($this->controller->famid) {
$fam = Family::getInstance($this->controller->famid);
if ($fam) $root = $fam->getHusband();
if (!$root) $root = $fam->getWife();
}
if ($root!=null) {
$out .= '
';
$out .= $this->getPersonLi($root, 1);
$out .= '
';
}
}
$out .= '
';
return $out;
}
public function getPersonLi(&$person, $generations=0) {
global $WT_IMAGE_DIR, $WT_IMAGES;
$out = '';
$out .= '