Allow YouTube-style media links to be counted as enclosures for purposes of listing attachments/thumbs
This commit is contained in:
parent
f25accc43e
commit
dbb95b76a4
@ -361,15 +361,19 @@ class File extends Memcached_DataObject
|
|||||||
if($semicolon){
|
if($semicolon){
|
||||||
$mimetype = substr($mimetype,0,$semicolon);
|
$mimetype = substr($mimetype,0,$semicolon);
|
||||||
}
|
}
|
||||||
if(in_array($mimetype,$notEnclosureMimeTypes)){
|
// @fixme uncertain if this is right.
|
||||||
return false;
|
// we want to expose things like YouTube videos as
|
||||||
}else{
|
// 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->mimetype) $enclosure->mimetype=$oembed->mimetype;
|
||||||
if($oembed->url) $enclosure->url=$oembed->url;
|
if($oembed->url) $enclosure->url=$oembed->url;
|
||||||
if($oembed->title) $enclosure->title=$oembed->title;
|
if($oembed->title) $enclosure->title=$oembed->title;
|
||||||
if($oembed->modified) $enclosure->modified=$oembed->modified;
|
if($oembed->modified) $enclosure->modified=$oembed->modified;
|
||||||
unset($oembed->size);
|
unset($oembed->size);
|
||||||
}
|
//}
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user