diff options
Diffstat (limited to 'library/WT/Individual.php')
| -rw-r--r-- | library/WT/Individual.php | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/library/WT/Individual.php b/library/WT/Individual.php index 62e8a183b5..8887f4022f 100644 --- a/library/WT/Individual.php +++ b/library/WT/Individual.php @@ -596,7 +596,7 @@ class WT_Individual extends WT_GedcomRecord { global $SHOW_PRIVATE_RELATIONSHIPS; $families = array(); - foreach ($this->getFacts('FAMS', false, $access_level) as $fact) { + foreach ($this->getFacts('FAMS', false, $access_level, $SHOW_PRIVATE_RELATIONSHIPS) as $fact) { $family = $fact->getTarget(); if ($family && ($SHOW_PRIVATE_RELATIONSHIPS || $family->canShow($access_level))) { $families[] = $family; @@ -638,7 +638,7 @@ class WT_Individual extends WT_GedcomRecord { global $SHOW_PRIVATE_RELATIONSHIPS; $families = array(); - foreach ($this->getFacts('FAMC', false, $access_level) as $fact) { + foreach ($this->getFacts('FAMC', false, $access_level, $SHOW_PRIVATE_RELATIONSHIPS) as $fact) { $family = $fact->getTarget(); if ($family && ($SHOW_PRIVATE_RELATIONSHIPS || $family->canShow($access_level))) { $families[] = $family; @@ -1017,18 +1017,10 @@ class WT_Individual extends WT_GedcomRecord { // Get an array of structures containing all the names in the record public function extractNames() { - // Cannot use ->getFacts('NAME'), as we need to bypass some of the privacy using $SHOW_LIVING_NAMES / canShowName() - if ($this->canShowName()) { - $facts = array(); - foreach ($this->facts as $fact) { - if ($fact->getTag() == 'NAME' && $fact->canShow()) { - $facts[] = $fact; - } - } - $this->_extractNames(1, 'NAME', $facts); - } + $this->_extractNames(1, 'NAME', $this->getFacts('NAME', false, WT_USER_ACCESS_LEVEL, $this->canShowName())); } + // Extra info to display when displaying this record in a list of // selection items or favorites. function format_list_details() { |
