summaryrefslogtreecommitdiff
path: root/library/WT/Media.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/WT/Media.php')
-rw-r--r--library/WT/Media.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/library/WT/Media.php b/library/WT/Media.php
index 52261dac23..891d2348c2 100644
--- a/library/WT/Media.php
+++ b/library/WT/Media.php
@@ -434,14 +434,11 @@ class WT_Media extends WT_GedcomRecord {
}
// Get an array of structures containing all the names in the record
- public function getAllNames() {
- if (strpos($this->getGedcom(), "\n1 TITL ")) {
- // Earlier gedcom versions had level 1 titles
- return parent::_getAllNames('TITL', 1);
- } else {
- // Later gedcom versions had level 2 titles
- return parent::_getAllNames('TITL', 2);
- }
+ public function extractNames() {
+ // Earlier gedcom versions had level 1 titles
+ // Later gedcom versions had level 2 titles
+ $this->_extractNames(2, 'TITL', $this->getFacts('FILE'));
+ $this->_extractNames(1, 'TITL', $this->getFacts('TITL'));
}
// Extra info to display when displaying this record in a list of