]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Using File->setTitle in oEmbed
authorMikael Nordfeldth <mmn@hethane.se>
Sat, 23 Jul 2016 19:01:28 +0000 (21:01 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Sat, 23 Jul 2016 19:01:28 +0000 (21:01 +0200)
plugins/Oembed/OembedPlugin.php

index 716649c68cd99dadf5f120204a7304f0a30f6e3f..187b4b9819bcdf84d48274124d3c8dcaef16e097 100644 (file)
@@ -174,7 +174,9 @@ class OembedPlugin extends Plugin
                 if ($oembed_data === false) {
                     throw new Exception('Did not get oEmbed data from URL');
                 }
+                $file->setTitle($oembed_data->title);
             } catch (Exception $e) {
+                common_log(LOG_WARN, sprintf(__METHOD__.': %s thrown when getting oEmbed data: %s', get_class($e), _ve($e->getMessage())));
                 return true;
             }