$gedcom = "0 @new@ FAM\n1 HUSB @" . $spouse->getXref() . "@\n1 WIFE @" . $person->getXref() . "@"; } splitSOUR(); $gedcom .= addNewFact('MARR'); if (WT_Filter::postBool('SOUR_FAM') || count($tagSOUR) > 0) { // before adding 2 SOUR it needs to add 1 MARR Y first if (addNewFact('MARR') == '') { $gedcom .= "\n1 MARR Y"; } $gedcom = handle_updates($gedcom); } else { // before adding level 2 facts it needs to add 1 MARR Y first if (addNewFact('MARR') == '') { $gedcom .= "\n1 MARR Y"; } $gedcom = updateRest($gedcom); } $family = WT_GedcomRecord::createRecord($gedcom, WT_GED_ID); $person->createFact('1 FAMS @' . $family->getXref() . '@', true); $spouse->createFact('1 FAMS @' . $family->getXref() . '@', true); $controller->addInlineJavascript('closePopupAndReloadParent();'); break; //////////////////////////////////////////////////////////////////////////////// // Create a new source record //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// // Create a new source record //////////////////////////////////////////////////////////////////////////////// case 'addnewsource': $controller->setPageTitle(WT_I18N::translate('Create a new source'))->pageHeader(); ?>
phpinfo(INFO_VARIABLES); } splitSOUR(); // separate SOUR record from the rest $newindixref = get_new_xref('INDI'); $newfamxref = get_new_xref('FAM'); $gedrec = "0 @{$newindixref}@ INDI\n1 FAMC @{$newfamxref}@\n" . addNewName() . addNewSex(); if (preg_match_all('/([A-Z0-9_]+)/', $QUICK_REQUIRED_FACTS, $matches)) { foreach ($matches[1] as $match) { $gedrec .= addNewFact($match); } } if (safe_POST_bool('SOUR_INDI')) { $gedrec = handle_updates($gedrec); } else { $gedrec = updateRest($gedrec); } $famrec = "0 @{$newfamxref}@ FAM\n1 CHIL @{$newindixref}@"; $person = Person::getInstance($pid); if ($person->getSex() == 'F') { $famrec .= "\n1 WIFE @{$pid}@"; } else { $famrec .= "\n1 HUSB @{$pid}@"; } if (!isset($pgv_changes[$pid . "_" . PGV_GEDCOM])) { $indirec = find_gedcom_record($pid, PGV_GED_ID); } else { $indirec = find_updated_record($pid, PGV_GED_ID); } if ($indirec) { $indirec .= "\n1 FAMS @{$newfamxref}@";