summaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2013-09-15 15:47:47 +0100
committerGreg Roach <fisharebest@gmail.com>2013-09-15 15:47:47 +0100
commit8014ae0e73006b7fbe64e0cf958f18454ff50e0b (patch)
treec8c5bb01ccd45dda66429334d591501cdc6980dd /library
parent7c02745c72229820a92cb0b32f401f5bcfdfd2cf (diff)
downloadwebtrees-8014ae0e73006b7fbe64e0cf958f18454ff50e0b.tar.gz
webtrees-8014ae0e73006b7fbe64e0cf958f18454ff50e0b.tar.bz2
webtrees-8014ae0e73006b7fbe64e0cf958f18454ff50e0b.zip
Fix: facts from other trees would link to the wrong tree
Diffstat (limited to 'library')
-rw-r--r--library/WT/Fact.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/WT/Fact.php b/library/WT/Fact.php
index 8bc4b42ac2..b35642f84b 100644
--- a/library/WT/Fact.php
+++ b/library/WT/Fact.php
@@ -217,7 +217,7 @@ class WT_Fact {
preg_match_all('/\n(2 SOUR @(' . WT_REGEX_XREF . ')@(?:\n[3-9] .*)*)/', $this->getGedcom(), $matches, PREG_SET_ORDER);
$citations = array();
foreach ($matches as $match) {
- $source = WT_Source::getInstance($match[2]);
+ $source = WT_Source::getInstance($match[2], $this->getParent()->getGedcomId());
if ($source->canShow()) {
$citations[] = $match[1];
}
@@ -232,7 +232,7 @@ class WT_Fact {
foreach ($matches[1] as $match) {
$note = preg_replace("/\n3 CONT ?/", "\n", $match);
if (preg_match('/@(' . WT_REGEX_XREF . ')@/', $note, $nmatch)) {
- $note = WT_Note::getInstance($nmatch[1]);
+ $note = WT_Note::getInstance($nmatch[1], $this->getParent()->getGedcomId());
if ($note && $note->canShow()) {
// A note object
$notes[] = $note;
@@ -250,7 +250,7 @@ class WT_Fact {
$media = array();
preg_match_all('/\n(2 OBJE @(' . WT_REGEX_XREF . ')@/', $this->getGedcom(), $matches);
foreach ($matches[1] as $match) {
- $obje = WT_Media::getInstance($match);
+ $obje = WT_Media::getInstance($match, $this->getParent()->getGedcomId());
if ($obje->canShow()) {
$media[] = $obje;
}