summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2011-10-27 20:56:26 +0000
committerfisharebest <fisharebest@gmail.com>2011-10-27 20:56:26 +0000
commitbbc4a7fb48ac971d91769e89ce7312642097df3e (patch)
tree98bc4caaf030d9c6c60f6a13d18eb31f6193dad5 /includes
parentfd0ab0c34e9f8fb0d7e4696c4b83130e381c1134 (diff)
downloadwebtrees-bbc4a7fb48ac971d91769e89ce7312642097df3e.tar.gz
webtrees-bbc4a7fb48ac971d91769e89ce7312642097df3e.tar.bz2
webtrees-bbc4a7fb48ac971d91769e89ce7312642097df3e.zip
#836264 - Linkage of media to source is not stored (version 1.2.3)
Diffstat (limited to 'includes')
-rw-r--r--includes/functions/functions_mediadb.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/includes/functions/functions_mediadb.php b/includes/functions/functions_mediadb.php
index 4b0b2b66da..4f43c55883 100644
--- a/includes/functions/functions_mediadb.php
+++ b/includes/functions/functions_mediadb.php
@@ -265,6 +265,11 @@ if (!$excludeLinks) {
$medialist[$key]["LINKS"][$sour->getXref()]='SOUR';
$medialist[$key]["LINKED"]=true;
}
+ // Notes cannot link to media objects directly - but source citations may link to them.
+ foreach (fetch_linked_note($media["XREF"], 'OBJE', WT_GED_ID) as $note) {
+ $medialist[$key]["LINKS"][$note->getXref()]='NOTE';
+ $medialist[$key]["LINKED"]=true;
+ }
}
}
// Search the list of GEDCOM changes pending approval. There may be some new
@@ -1841,7 +1846,13 @@ function PrintMediaLinks($links, $size = "small") {
$linkItem['record']=$record;
$linkList[] = $linkItem;
break;
-
+ case 'NOTE':
+ // Notes cannot link to media objects directly - but source citations may link to them.
+ $linkItem = array ();
+ $linkItem['name']='D'.$record->getSortName();
+ $linkItem['record']=$record;
+ $linkList[] = $linkItem;
+ break;
}
}
}
@@ -1871,6 +1882,10 @@ function PrintMediaLinks($links, $size = "small") {
case 'SOUR':
echo WT_I18N::translate('View Source');
break;
+ case 'NOTE':
+ // Notes cannot link to media objects directly - but source citations may link to them.
+ echo WT_I18N::translate('View Note');
+ break;
}
echo ' -- ';
echo $record->getFullname();