|
@@ 130-134 (lines=5) @@
|
| 127 |
|
$family = Family::getInstance($path[$i], $WT_TREE); |
| 128 |
|
$prev = Individual::getInstance($path[$i - 1], $WT_TREE); |
| 129 |
|
$next = Individual::getInstance($path[$i + 1], $WT_TREE); |
| 130 |
|
if (preg_match('/\n\d (HUSB|WIFE|CHIL) @' . $prev->getXref() . '@/', $family->getGedcom(), $match)) { |
| 131 |
|
$rel1 = $match[1]; |
| 132 |
|
} else { |
| 133 |
|
return array(); |
| 134 |
|
} |
| 135 |
|
if (preg_match('/\n\d (HUSB|WIFE|CHIL) @' . $next->getXref() . '@/', $family->getGedcom(), $match)) { |
| 136 |
|
$rel2 = $match[1]; |
| 137 |
|
} else { |
|
@@ 135-139 (lines=5) @@
|
| 132 |
|
} else { |
| 133 |
|
return array(); |
| 134 |
|
} |
| 135 |
|
if (preg_match('/\n\d (HUSB|WIFE|CHIL) @' . $next->getXref() . '@/', $family->getGedcom(), $match)) { |
| 136 |
|
$rel2 = $match[1]; |
| 137 |
|
} else { |
| 138 |
|
return array(); |
| 139 |
|
} |
| 140 |
|
if (($rel1 === 'HUSB' || $rel1 === 'WIFE') && ($rel2 === 'HUSB' || $rel2 === 'WIFE')) { |
| 141 |
|
$relationships[$i] = $spouse_codes[$next->getSex()]; |
| 142 |
|
} elseif (($rel1 === 'HUSB' || $rel1 === 'WIFE') && $rel2 === 'CHIL') { |