0) { $favorite = array(); $favorite['username'] = WT_GEDCOM; $favorite['gid'] = $gid; $favorite['type'] = trim($match[2]); $favorite['file'] = WT_GEDCOM; $favorite['url'] = ''; $favorite['note'] = $favnote; $favorite['title'] = ''; self::addFavorite($favorite); } } if ($url) { if (empty($favtitle)) $favtitle = $url; $favorite = array(); $favorite['username'] = WT_GEDCOM; $favorite['gid'] = ''; $favorite['type'] = 'URL'; $favorite['file'] = WT_GEDCOM; $favorite['url'] = $url; $favorite['note'] = $favnote; $favorite['title'] = $favtitle; self::addFavorite($favorite); } unset($_GET['action']); break; } $block=get_block_setting($block_id, 'block', false); if ($cfg) { foreach (array('block') as $name) { if (array_key_exists($name, $cfg)) { $$name=$cfg[$name]; } } } // Override GEDCOM configuration temporarily if (isset($show_full)) $saveShowFull = $show_full; $savePedigreeFullDetails = $PEDIGREE_FULL_DETAILS; $show_full = 1; $PEDIGREE_FULL_DETAILS = 1; $userfavs = self::getUserFavorites(WT_GEDCOM); if (!is_array($userfavs)) $userfavs = array(); $id=$this->getName().$block_id; $title=$this->getTitle(); if (WT_USER_IS_ADMIN && $ENABLE_AUTOCOMPLETE) { // TODO: do we really need to load jquery again? $content = ' '; } else $content = ''; if ($block) { $style = 2; // 1 means "regular box", 2 means "wide box" $tableWidth = ($BROWSERTYPE=='msie') ? '95%' : '99%'; // IE needs to have room for vertical scroll bar inside the box $cellSpacing = '1px'; } else { $style = 2; $tableWidth = '99%'; $cellSpacing = '3px'; } if ($userfavs) { $content .= "
| ';
if ($favorite['type']=='URL') {
$content .= " ";
if ($ctype=='user' || WT_USER_GEDCOM_ADMIN) $content .= $removeFavourite;
$content .= "".PrintReady($favorite['title']).'';
$content .= " ";
} else {
$record=WT_GedcomRecord::getInstance($favorite['gid']);
if ($record && $record->canDisplayDetails()) {
if ($favorite["type"]=="INDI") {
$indirec = find_person_record($favorite["gid"], WT_GED_ID);
$content .= "".PrintReady($favorite["note"]); $content .= " ";
if ($ctype=="user" || WT_USER_GEDCOM_ADMIN) $content .= $removeFavourite;
ob_start();
print_pedigree_person($record, $style, 1, $key);
$content .= ob_get_clean();
$content .= PrintReady($favorite["note"]);
$content .= " ";
} else {
$record=WT_GedcomRecord::getInstance($favorite['gid']);
$content .= "";
if ($ctype=="user" || WT_USER_GEDCOM_ADMIN) $content .= $removeFavourite;
if ($record) {
$content.=$record->format_list('span');
} else {
$content.=WT_I18N::translate('No such ID exists in this GEDCOM file.');
}
$content .= " ";
}
}
}
$content .= "".PrintReady($favorite["note"]); $content .= " |