[PLUGINS] Fixed oEmbed dependents to use Embed

This commit is contained in:
Miguel Dantas
2019-07-06 17:26:15 +01:00
committed by Diogo Cordeiro
parent 2a2b3f72fb
commit b25632ebc4
8 changed files with 22 additions and 21 deletions

View File

@@ -1 +1 @@
Depends on the oEmbed plugin (Oembed).
Depends on the Embed plugin.

View File

@@ -48,7 +48,7 @@ if (!defined('STATUSNET')) {
class BookmarkforurlAction extends Action
{
protected $url = null;
protected $oembed = null;
protected $embed = null;
protected $thumbnail = null;
protected $title = null;
@@ -89,9 +89,9 @@ class BookmarkforurlAction extends Action
if ($f instanceof File) {
// FIXME: Use some File metadata Event instead
$this->oembed = File_oembed::getKV('file_id', $f->id);
if ($this->oembed instanceof File_oembed) {
$this->title = $this->oembed->title;
$this->embed = File_embed::getKV('file_id', $f->id);
if ($this->embed instanceof File_embed) {
$this->title = $this->embed->title;
}
$this->thumbnail = File_thumbnail::getKV('file_id', $f->id);
}