]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Oembed/classes/File_oembed.php
Merge remote-tracking branch 'upstream/master' into social-master
[quix0rs-gnu-social.git] / plugins / Oembed / classes / File_oembed.php
index 27ec97fcc084572027443885c49db7bba2fc2cd5..02f48f623e62a8600bdbd59e88524b2579b6887b 100644 (file)
@@ -49,15 +49,15 @@ class File_oembed extends Managed_DataObject
                 'version' => array('type' => 'varchar', 'length' => 20, 'description' => 'oEmbed spec. version'),
                 'type' => array('type' => 'varchar', 'length' => 20, 'description' => 'oEmbed type: photo, video, link, rich'),
                 'mimetype' => array('type' => 'varchar', 'length' => 50, 'description' => 'mime type of resource'),
-                'provider' => array('type' => 'varchar', 'length' => 50, 'description' => 'name of this oEmbed provider'),
-                'provider_url' => array('type' => 'varchar', 'length' => 191, 'description' => 'URL of this oEmbed provider'),
+                'provider' => array('type' => 'text', 'description' => 'name of this oEmbed provider'),
+                'provider_url' => array('type' => 'text', 'description' => 'URL of this oEmbed provider'),
                 'width' => array('type' => 'int', 'description' => 'width of oEmbed resource when available'),
                 'height' => array('type' => 'int', 'description' => 'height of oEmbed resource when available'),
                 'html' => array('type' => 'text', 'description' => 'html representation of this oEmbed resource when applicable'),
-                'title' => array('type' => 'varchar', 'length' => 191, 'description' => 'title of oEmbed resource when available'),
-                'author_name' => array('type' => 'varchar', 'length' => 50, 'description' => 'author name for this oEmbed resource'),
-                'author_url' => array('type' => 'varchar', 'length' => 191, 'description' => 'author URL for this oEmbed resource'),
-                'url' => array('type' => 'varchar', 'length' => 191, 'description' => 'URL for this oEmbed resource when applicable (photo, link)'),
+                'title' => array('type' => 'text', 'description' => 'title of oEmbed resource when available'),
+                'author_name' => array('type' => 'text', 'description' => 'author name for this oEmbed resource'),
+                'author_url' => array('type' => 'text', 'description' => 'author URL for this oEmbed resource'),
+                'url' => array('type' => 'text', 'description' => 'URL for this oEmbed resource when applicable (photo, link)'),
                 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
             ),
             'primary key' => array('file_id'),
@@ -68,12 +68,8 @@ class File_oembed extends Managed_DataObject
     }
 
     static function _getOembed($url) {
-        $parameters = array(
-            'maxwidth' => common_config('thumbnail', 'width'),
-            'maxheight' => common_config('thumbnail', 'height'),
-        );
         try {
-            return oEmbedHelper::getObject($url, $parameters);
+            return oEmbedHelper::getObject($url);
         } catch (Exception $e) {
             common_log(LOG_INFO, "Error during oembed lookup for $url - " . $e->getMessage());
             return false;