diff options
| author | Greg Roach <fisharebest@gmail.com> | 2013-10-05 16:00:17 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2013-10-05 16:00:17 +0100 |
| commit | 34cdbc3cebb3fecca9c960e3fa52aba10017d039 (patch) | |
| tree | 1e7c64124a0716679642e256efcf87f1c302d601 /modules_v3 | |
| parent | 72d4438ed01479c1cf25dce6821a8382b28e5096 (diff) | |
| download | webtrees-34cdbc3cebb3fecca9c960e3fa52aba10017d039.tar.gz webtrees-34cdbc3cebb3fecca9c960e3fa52aba10017d039.tar.bz2 webtrees-34cdbc3cebb3fecca9c960e3fa52aba10017d039.zip | |
#1234936 - 1.5.0 GEDfact module adds wrong link
Diffstat (limited to 'modules_v3')
| -rw-r--r-- | modules_v3/GEDFact_assistant/_MEDIA/media_0_inverselink.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules_v3/GEDFact_assistant/_MEDIA/media_0_inverselink.php b/modules_v3/GEDFact_assistant/_MEDIA/media_0_inverselink.php index 5701317aa4..62eae3fdbf 100644 --- a/modules_v3/GEDFact_assistant/_MEDIA/media_0_inverselink.php +++ b/modules_v3/GEDFact_assistant/_MEDIA/media_0_inverselink.php @@ -611,9 +611,11 @@ function shiftlinks() { } // Add new Links ==================================== if ($more_links) { - foreach (explode(',', $more_links) as $addLinkId) { + // array_unique() because parseAddLinks() may includes the gid field, even + // when it is also in the list. + foreach (array_unique(explode(',', $more_links)) as $addLinkId) { $indi = WT_Individual::getInstance($addLinkId); - $indi->createFact('1 OBJE @' . $addLinkId . '@', $update_CHAN!='no_change'); + $indi->createFact('1 OBJE @' . $mediaid . '@', $update_CHAN!='no_change'); } } $controller->addInlineJavascript('closePopupAndReloadParent();'); |
