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.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/library/WT/Media.php b/library/WT/Media.php
index 4a5cbb855f..bd4e93d899 100644
--- a/library/WT/Media.php
+++ b/library/WT/Media.php
@@ -240,13 +240,13 @@ class WT_Media extends WT_GedcomRecord {
return ($etag_string);
}
- /**
- * get the media type from the gedcom
- * @return string
- */
+ // TODO Deprecated? This does not need to be a function here.
public function getMediaType() {
- $mediaType = strtolower(get_gedcom_value('FORM:TYPE', 2, $this->getGedcom()));
- return $mediaType;
+ if (preg_match('\n\d TYPE (.+)', $this->gedcom, $match)) {
+ return strtolower($match[1]);
+ } else {
+ return '';
+ }
}
// Is this object marked as a highlighted image?