summaryrefslogtreecommitdiff
path: root/app/Note.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2015-03-08 17:09:41 +0000
committerGreg Roach <fisharebest@gmail.com>2015-03-09 00:08:53 +0000
commit24ec66ce7e77188cd2495b0f8d4dd0ae6e8c9c52 (patch)
tree0059c30afd4b78da23f28067165a7b17415924d8 /app/Note.php
parent3763c3f2dff6a4360b7b8810b6250e372dded805 (diff)
downloadwebtrees-24ec66ce7e77188cd2495b0f8d4dd0ae6e8c9c52.tar.gz
webtrees-24ec66ce7e77188cd2495b0f8d4dd0ae6e8c9c52.tar.bz2
webtrees-24ec66ce7e77188cd2495b0f8d4dd0ae6e8c9c52.zip
Use Tree object instead of ID/name
Diffstat (limited to 'app/Note.php')
-rw-r--r--app/Note.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/Note.php b/app/Note.php
index d55b5aaf39..5f4bdb1c89 100644
--- a/app/Note.php
+++ b/app/Note.php
@@ -28,14 +28,14 @@ class Note extends GedcomRecord {
* we just receive the XREF. For bulk records (such as lists
* and search results) we can receive the GEDCOM data as well.
*
- * @param string $xref
- * @param integer|null $gedcom_id
- * @param string|null $gedcom
+ * @param string $xref
+ * @param Tree $tree
+ * @param string|null $gedcom
*
* @return Note|null
*/
- public static function getInstance($xref, $gedcom_id = WT_GED_ID, $gedcom = null) {
- $record = parent::getInstance($xref, $gedcom_id, $gedcom);
+ public static function getInstance($xref, Tree $tree, $gedcom = null) {
+ $record = parent::getInstance($xref, $tree, $gedcom);
if ($record instanceof Note) {
return $record;
@@ -66,7 +66,7 @@ class Note extends GedcomRecord {
$this->xref, $this->tree->getTreeId()
))->fetchOneColumn();
foreach ($linked_ids as $linked_id) {
- $linked_record = GedcomRecord::getInstance($linked_id);
+ $linked_record = GedcomRecord::getInstance($linked_id, $this->tree);
if ($linked_record && !$linked_record->canShow($access_level)) {
return false;
}