diff options
| author | Łukasz Wilenski <wooc@gazeta.pl> | 2011-02-22 19:06:17 +0000 |
|---|---|---|
| committer | Łukasz Wilenski <wooc@gazeta.pl> | 2011-02-22 19:06:17 +0000 |
| commit | bf3ad119142e2d31ecb93306227ac2ba58b66526 (patch) | |
| tree | d6e74dd3215e8edc3917c66be81077abf797d82d | |
| parent | 8d249016a8ab99045cae5bbd2101e8fc477142ca (diff) | |
| download | webtrees-bf3ad119142e2d31ecb93306227ac2ba58b66526.tar.gz webtrees-bf3ad119142e2d31ecb93306227ac2ba58b66526.tar.bz2 webtrees-bf3ad119142e2d31ecb93306227ac2ba58b66526.zip | |
#722459 - Auto close fails on attach as child
| -rw-r--r-- | edit_interface.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/edit_interface.php b/edit_interface.php index f53af8c857..35a08d24f0 100644 --- a/edit_interface.php +++ b/edit_interface.php @@ -583,6 +583,7 @@ case 'linkfamaction': $gedrec .= "1 FAMS @$famid@"; } replace_gedrec($pid, WT_GED_ID, $gedrec, $update_CHAN); + $success = true; } //-- if it is adding a new child to a family @@ -590,6 +591,7 @@ case 'linkfamaction': if (strpos($famrec, "1 $famtag @$pid@")===false) { $famrec = trim($famrec) . "\n1 $famtag @$pid@\n"; replace_gedrec($famid, WT_GED_ID, $famrec, $update_CHAN); + $success = true; } } else { //-- if it is adding a husband or wife @@ -603,18 +605,21 @@ case 'linkfamaction': //-- change a of the old ids to the new id $famrec = str_replace("1 $famtag @$spid@", "1 $famtag @$pid@", $famrec); replace_gedrec($famid, WT_GED_ID, $famrec, $update_CHAN); + $success = true; //-- remove the FAMS reference from the old husb/wife if (!empty($spid)) { $srec = find_gedcom_record($spid, WT_GED_ID, true); if ($srec) { $srec = str_replace("1 $itag @$famid@", "", $srec); replace_gedrec($spid, WT_GED_ID, $srec, $update_CHAN); + $success = true; } } } } else { $famrec .= "\n1 $famtag @$pid@\n"; replace_gedrec($famid, WT_GED_ID, $famrec, $update_CHAN); + $success = true; } } } else { |
