]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Oembed/OembedPlugin.php
Vimeo oEmbed thumbnail host added to whitelist
[quix0rs-gnu-social.git] / plugins / Oembed / OembedPlugin.php
index 29c6f08dd28d6338d5a6ea9746142816b3d6f133..a366103a021f92cca829e3c12039397ddfc34588 100644 (file)
@@ -8,6 +8,7 @@ class OembedPlugin extends Plugin
     // WARNING, these are _regexps_ (slashes added later). Always escape your dots and end your strings
     public $domain_whitelist = array(       // hostname => service provider
                                     '^i\d*\.ytimg\.com$' => 'YouTube',
+                                    '^i\d*\.vimeocdn\.com$' => 'Vimeo',
                                     );
     public $append_whitelist = array(); // fill this array as domain_whitelist to add more trusted sources
     public $check_whitelist  = true;    // security/abuse precaution
@@ -289,7 +290,7 @@ class OembedPlugin extends Plugin
         $thumbnail->width = $info[0];    // array indexes documented on php.net:
         $thumbnail->height = $info[1];   // https://php.net/manual/en/function.getimagesize.php
         // Throws exception on failure.
-        $thumbnail->updateWithKeys($orig);
+        $thumbnail->updateWithKeys($orig, 'file_id');
     }
 
     public function onPluginVersion(array &$versions)