We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit dbb95b76 authored by Brion Vibber's avatar Brion Vibber

Allow YouTube-style media links to be counted as enclosures for purposes of...

Allow YouTube-style media links to be counted as enclosures for purposes of listing attachments/thumbs
parent f25accc4
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment