summaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2013-06-16 16:12:55 +0000
committerfisharebest <fisharebest@gmail.com>2013-06-16 16:12:55 +0000
commit921694d21066df932132905db57f23b7e2c089c9 (patch)
tree36ffdfc845de6180d5bb5159c2ee67430ceb8d13 /library
parent137615391d861f18ad48aeb5097304a51b22d7a0 (diff)
downloadwebtrees-921694d21066df932132905db57f23b7e2c089c9.tar.gz
webtrees-921694d21066df932132905db57f23b7e2c089c9.tar.bz2
webtrees-921694d21066df932132905db57f23b7e2c089c9.zip
relationship.php - now needs to process objects instead of XREFs
Diffstat (limited to 'library')
-rw-r--r--library/WT/Person.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/library/WT/Person.php b/library/WT/Person.php
index fa4dc859cf..3c5da25bf1 100644
--- a/library/WT/Person.php
+++ b/library/WT/Person.php
@@ -95,7 +95,10 @@ class WT_Person extends WT_GedcomRecord {
}
// Consider relationship privacy (unless an admin is applying download restrictions)
if (WT_USER_GEDCOM_ID && WT_USER_PATH_LENGTH && $this->getGedId()==WT_GED_ID && $access_level=WT_USER_ACCESS_LEVEL) {
- return get_relationship(WT_Person::getInstance(WT_USER_GEDCOM_ID), $this, true, WT_USER_PATH_LENGTH)!==false;
+ $self = WT_Person::getInstance(WT_USER_GEDCOM_ID);
+ if ($self) {
+ return get_relationship($self, $this, true, WT_USER_PATH_LENGTH)!==false;
+ }
}
// No restriction found - show living people to members only:
return WT_PRIV_USER>=$access_level;