summaryrefslogtreecommitdiff
path: root/library/WT/GedcomRecord.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2013-08-19 21:57:06 +0100
committerGreg Roach <fisharebest@gmail.com>2013-08-19 21:57:06 +0100
commitad472bc914ba8e8b08407f6cd57373f91cd0bdfa (patch)
treed7ea7fb5cc50d56057b58054851fe51fcb5c9373 /library/WT/GedcomRecord.php
parent584b9b3b88793ce311615499e0300ca507dc619b (diff)
downloadwebtrees-ad472bc914ba8e8b08407f6cd57373f91cd0bdfa.tar.gz
webtrees-ad472bc914ba8e8b08407f6cd57373f91cd0bdfa.tar.bz2
webtrees-ad472bc914ba8e8b08407f6cd57373f91cd0bdfa.zip
Finally remove the old gedcom-based privacy functions
Diffstat (limited to 'library/WT/GedcomRecord.php')
-rw-r--r--library/WT/GedcomRecord.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/library/WT/GedcomRecord.php b/library/WT/GedcomRecord.php
index 841d6cedc3..0c299f20ba 100644
--- a/library/WT/GedcomRecord.php
+++ b/library/WT/GedcomRecord.php
@@ -383,12 +383,9 @@ class WT_GedcomRecord {
// Include the entire first line (for NOTE records)
list($gedrec)=explode("\n", $this->gedcom, 2);
- // Check each of the sub facts for access
- preg_match_all('/\n1 .*(?:\n[2-9].*)*/', $this->gedcom, $matches);
- foreach ($matches[0] as $match) {
- if (canDisplayFact($this->xref, $this->gedcom_id, $match, $access_level)) {
- $gedrec.=$match;
- }
+ // Check each of the facts for access
+ foreach ($this->getFacts(null, $access_level) as $fact) {
+ $gedrec .= "\n" . $fact->getGedcom();
}
return $gedrec;
} else {