diff options
| author | Greg Roach <fisharebest@gmail.com> | 2015-01-25 20:03:27 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2015-01-25 20:03:27 +0000 |
| commit | e1b86d69594f48baba74f32d63a594a431b5cd83 (patch) | |
| tree | c07c6cb293ae2065c73cf1d386f09e6ff45cbb2a /includes | |
| parent | 726a28be36901a38896d6314822d5115b1ef9717 (diff) | |
| download | webtrees-e1b86d69594f48baba74f32d63a594a431b5cd83.tar.gz webtrees-e1b86d69594f48baba74f32d63a594a431b5cd83.tar.bz2 webtrees-e1b86d69594f48baba74f32d63a594a431b5cd83.zip | |
Add 'ex-partner', same as 'ex-husband'
Diffstat (limited to 'includes')
| -rw-r--r-- | includes/functions/functions.php | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/includes/functions/functions.php b/includes/functions/functions.php index 85a242c6f2..dd788ab4ba 100644 --- a/includes/functions/functions.php +++ b/includes/functions/functions.php @@ -858,7 +858,11 @@ function get_relationship_name_from_path($path, WT_Individual $person1 = null, W foreach ($person1->getSpouseFamilies() as $family) { if ($person2 === $family->getSpouse($person1)) { if ($family->getFacts('_NMR')) { - return WT_I18N::translate_c('MALE', 'partner'); + if ($family->getFacts(WT_EVENTS_DIV)) { + return WT_I18N::translate_c('MALE', 'ex-partner'); + } else { + return WT_I18N::translate_c('MALE', 'partner'); + } } elseif ($family->getFacts(WT_EVENTS_DIV)) { return WT_I18N::translate('ex-husband'); } @@ -872,7 +876,11 @@ function get_relationship_name_from_path($path, WT_Individual $person1 = null, W foreach ($person1->getSpouseFamilies() as $family) { if ($person2 === $family->getSpouse($person1)) { if ($family->getFacts('_NMR')) { - return WT_I18N::translate_c('FEMALE', 'partner'); + if ($family->getFacts(WT_EVENTS_DIV)) { + return WT_I18N::translate_c('FEMALE', 'ex-partner'); + } else { + return WT_I18N::translate_c('FEMALE', 'partner'); + } } elseif ($family->getFacts(WT_EVENTS_DIV)) { return WT_I18N::translate('ex-wife'); } @@ -886,7 +894,11 @@ function get_relationship_name_from_path($path, WT_Individual $person1 = null, W foreach ($person1->getSpouseFamilies() as $family) { if ($person2 === $family->getSpouse($person1)) { if ($family->getFacts('_NMR')) { - return WT_I18N::translate_c('MALE/FEMALE', 'partner'); + if ($family->getFacts(WT_EVENTS_DIV)) { + return WT_I18N::translate_c('MALE/FEMALE', 'ex-partner'); + } else { + return WT_I18N::translate_c('MALE/FEMALE', 'partner'); + } } elseif ($family->getFacts(WT_EVENTS_DIV)) { return WT_I18N::translate('ex-spouse'); } |
