diff options
author | Brion Vibber <brion@status.net> | 2010-11-09 12:04:07 -0800 |
---|---|---|
committer | Brion Vibber <brion@status.net> | 2010-11-09 12:04:07 -0800 |
commit | dbb95b76a4d384fd62fd24b4d427baefd007cb90 (patch) | |
tree | 48dadd79572baf313311ed38778c8296ab4b23ad | |
parent | f25accc43ea1e66f290c8bc1d284ae04b4bf004f (diff) |
Allow YouTube-style media links to be counted as enclosures for purposes of listing attachments/thumbs
-rw-r--r-- | classes/File.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/classes/File.php b/classes/File.php index 56bc73ab2..499c8d72c 100644 --- a/classes/File.php +++ b/classes/File.php @@ -361,15 +361,19 @@ class File extends Memcached_DataObject if($semicolon){ $mimetype = substr($mimetype,0,$semicolon); } - if(in_array($mimetype,$notEnclosureMimeTypes)){ - return false; - }else{ + // @fixme uncertain if this is right. + // we want to expose things like YouTube videos as + // viewable attachments, but don't expose them as + // downloadable enclosures.....? + //if (in_array($mimetype, $notEnclosureMimeTypes)) { + // return false; + //} else { if($oembed->mimetype) $enclosure->mimetype=$oembed->mimetype; if($oembed->url) $enclosure->url=$oembed->url; if($oembed->title) $enclosure->title=$oembed->title; if($oembed->modified) $enclosure->modified=$oembed->modified; unset($oembed->size); - } + //} } else { return false; } |