Bugfix DFRN and bookmark detection

This commit is contained in:
Michael Vogel 2016-04-24 17:00:19 +02:00 committed by Roland Haeder
parent cea445b6f3
commit e7c4d0bc50
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
4 changed files with 21 additions and 19 deletions

View file

@ -136,29 +136,25 @@ function get_attachment_data($body) {
$data["title"] = $title;
$image = "";
if ($type != "video") {
preg_match("/image='(.*?)'/ism", $attributes, $matches);
if ($matches[1] != "")
$image = $matches[1];
preg_match("/image='(.*?)'/ism", $attributes, $matches);
if ($matches[1] != "")
$image = $matches[1];
preg_match('/image="(.*?)"/ism', $attributes, $matches);
if ($matches[1] != "")
$image = $matches[1];
}
preg_match('/image="(.*?)"/ism', $attributes, $matches);
if ($matches[1] != "")
$image = $matches[1];
if ($image != "")
$data["image"] = $image;
$preview = "";
if ($type != "video") {
preg_match("/preview='(.*?)'/ism", $attributes, $matches);
if ($matches[1] != "")
$preview = $matches[1];
preg_match("/preview='(.*?)'/ism", $attributes, $matches);
if ($matches[1] != "")
$preview = $matches[1];
preg_match('/preview="(.*?)"/ism', $attributes, $matches);
if ($matches[1] != "")
$preview = $matches[1];
}
preg_match('/preview="(.*?)"/ism', $attributes, $matches);
if ($matches[1] != "")
$preview = $matches[1];
if ($preview != "")
$data["preview"] = $preview;