]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Allow YouTube-style media links to be counted as enclosures for purposes of listing...
authorBrion Vibber <brion@status.net>
Tue, 9 Nov 2010 20:04:07 +0000 (12:04 -0800)
committerBrion Vibber <brion@status.net>
Tue, 9 Nov 2010 20:04:07 +0000 (12:04 -0800)
classes/File.php

index 56bc73ab257d4d40948f4cc1dcfb7e5e826250c2..499c8d72c392f9225cf11e3ed009b40272802506 100644 (file)
@@ -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;
                 }