} echo json_encode($data); return; case 'IFS': $data = array(); // Fetch all data, regardless of privacy $rows = get_INDI_rows($WT_TREE, $term); // Filter for privacy foreach ($rows as $row) { $person = Individual::getInstance($row->xref, $WT_TREE, $row->gedcom); if ($person->canShowName()) { $data[] = array('value' => $person->getXref(), 'label' => str_replace(array('@N.N.', '@P.N.'), array(I18N::translateContext('Unknown surname', '…'), I18N::translateContext('Unknown given name', '…')), $row->n_full) . ', <i>' . $person->getLifeSpan() . '</i>'); } } // Fetch all data, regardless of privacy $rows = get_SOUR_rows($WT_TREE, $term); // Filter for privacy foreach ($rows as $row) { $source = Source::getInstance($row->xref, $WT_TREE, $row->gedcom); if ($source->canShowName()) { $data[] = array('value' => $source->getXref(), 'label' => $source->getFullName()); } } // Fetch all data, regardless of privacy $rows = get_FAM_rows($WT_TREE, $term); // Filter for privacy foreach ($rows as $row) { $family = Family::getInstance($row->xref, $WT_TREE, $row->gedcom); if ($family->canShowName()) { $marriage_year = $family->getMarriageYear(); if ($marriage_year) {
} echo json_encode($data); exit; case 'IFS': $data = array(); // Fetch all data, regardless of privacy $rows = get_INDI_rows($term); // Filter for privacy foreach ($rows as $row) { $person = WT_Individual::getInstance($row->xref, $row->gedcom_id, $row->gedcom); if ($person->canShowName()) { $data[] = array('value' => $person->getXref(), 'label' => str_replace(array('@N.N.', '@P.N.'), array($UNKNOWN_NN, $UNKNOWN_PN), $row->n_full) . ', <i>' . $person->getLifeSpan() . '</i>'); } } // Fetch all data, regardless of privacy $rows = get_SOUR_rows($term); // Filter for privacy foreach ($rows as $row) { $source = WT_Source::getInstance($row->xref, $row->gedcom_id, $row->gedcom); if ($source->canShowName()) { $data[] = array('value' => $source->getXref(), 'label' => $source->getFullName()); } } // Fetch all data, regardless of privacy $rows = get_FAM_rows($term); // Filter for privacy foreach ($rows as $row) { $family = WT_Family::getInstance($row->xref, $row->gedcom_id, $row->gedcom); if ($family->canShowName()) { $marriage_year = $family->getMarriageYear(); if ($marriage_year) {