Пример #1
0
     }
     // Fetch all data, regardless of privacy
     $rows = get_NOTE_rows($WT_TREE, $term);
     // Filter for privacy
     foreach ($rows as $row) {
         $note = Note::getInstance($row->xref, $WT_TREE, $row->gedcom);
         if ($note->canShowName()) {
             $data[] = array('value' => $note->getXref(), 'label' => $note->getFullName());
         }
     }
     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());
         }
Пример #2
0
     }
     // Fetch all data, regardless of privacy
     $rows = get_NOTE_rows($term);
     // Filter for privacy
     foreach ($rows as $row) {
         $note = WT_Note::getInstance($row->xref, $row->gedcom_id, $row->gedcom);
         if ($note->canShowName()) {
             $data[] = array('value' => $note->getXref(), 'label' => $note->getFullName());
         }
     }
     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());
         }