controller->indi->canDisplayDetails()) { echo ""; } else { ?> controller->getOtherFacts(); foreach ($otheritems as $key => $event) { if ($event->getTag()=="SOUR") print_main_sources($event->getGedcomRecord(), 1, $this->controller->pid, $event->getLineNumber()); $FACT_COUNT++; } } // 2nd level sources [ 1712181 ] $this->controller->indi->add_family_facts(false); foreach ($this->controller->getIndiFacts() as $key => $factrec) { print_main_sources($factrec->getGedcomRecord(), 2, $this->controller->pid, $factrec->getLineNumber(), true); } if ($this->get_source_count()==0) echo ""; //-- New Source Link if ($this->controller->indi->canEdit()) { ?>
"; print_privacy_error(); echo "
onclick="toggleByClassName('TR', 'row_sour2');" />
".WT_I18N::translate('There are no Source citations for this individual.')."


getName().'_content">'.ob_get_clean().''; } function get_source_count() { if ($this->sourceCount===null) { $ct = preg_match_all("/\d SOUR @(.*)@/", $this->controller->indi->getGedcomRecord(), $match, PREG_SET_ORDER); foreach ($this->controller->indi->getSpouseFamilies() as $sfam) $ct += preg_match("/\d SOUR /", $sfam->getGedcomRecord()); $this->sourceCount = $ct; } return $this->sourceCount; } // Implement WT_Module_Tab public function hasTabContent() { return WT_USER_CAN_EDIT || $this->get_source_count()>0; } // Implement WT_Module_Tab public function canLoadAjax() { return true; } // Implement WT_Module_Tab public function getPreLoadContent() { return ''; } // Implement WT_Module_Tab public function getJSCallback() { return ''; } }