Bugfix: Reimported Friendica posts from pump.io had the links missing.

This commit is contained in:
Michael 2016-12-18 23:39:44 +00:00
parent b3fa0a4e90
commit 8cab220387

View file

@ -63,6 +63,10 @@ function get_old_attachment_data($body) {
$post["url"] = $matches[1]; $post["url"] = $matches[1];
$post["title"] = $matches[2]; $post["title"] = $matches[2];
} }
if (($post["url"] == "") AND (in_array($post["type"], array("link", "video")))
AND preg_match("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", $attacheddata, $matches)) {
$post["url"] = $matches[1];
}
// Search for description // Search for description
if (preg_match("/\[quote\](.*?)\[\/quote\]/ism", $attacheddata, $matches)) if (preg_match("/\[quote\](.*?)\[\/quote\]/ism", $attacheddata, $matches))