summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2017-07-16 21:00:13 +0100
committerGreg Roach <fisharebest@gmail.com>2017-07-16 21:00:13 +0100
commitb8a933c8ee30a27789a6064d4879ef3b5fab2cf6 (patch)
tree7bde13700ea5d9e7dce6236ff54440f2980c9b2d
parent86dd5955cc01bbdd88ff3aa47a76f0740da1cddb (diff)
downloadwebtrees-b8a933c8ee30a27789a6064d4879ef3b5fab2cf6.tar.gz
webtrees-b8a933c8ee30a27789a6064d4879ef3b5fab2cf6.tar.bz2
webtrees-b8a933c8ee30a27789a6064d4879ef3b5fab2cf6.zip
Fix #1212 - use baptisms on google maps tab
-rw-r--r--app/Module/GoogleMapsModule.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/Module/GoogleMapsModule.php b/app/Module/GoogleMapsModule.php
index 91d4aef411..826db7ee0d 100644
--- a/app/Module/GoogleMapsModule.php
+++ b/app/Module/GoogleMapsModule.php
@@ -1246,11 +1246,11 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface,
$facts = array_merge($facts, $family->getFacts());
// Add birth of children from this family to the facts array
foreach ($family->getChildren() as $child) {
- $birth_fact = $child->getFirstFact('BIRT');
- // Exclude children without birthplaces
- // facts without places
- if ($birth_fact !== null && $birth_fact->getPlace() !== null) {
- $facts[] = $birth_fact;
+ foreach ($child->getFacts(WT_EVENTS_BIRT, true) as $fact) {
+ if ($fact->getPlace() !== null) {
+ $facts[] = $fact;
+ break;
+ }
}
}
}