From 8cab220387d2cf32d0620ec178e13177b25710fe Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 18 Dec 2016 23:39:44 +0000 Subject: [PATCH] Bugfix: Reimported Friendica posts from pump.io had the links missing. --- include/plaintext.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/plaintext.php b/include/plaintext.php index d98d73655..830272867 100644 --- a/include/plaintext.php +++ b/include/plaintext.php @@ -63,6 +63,10 @@ function get_old_attachment_data($body) { $post["url"] = $matches[1]; $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 if (preg_match("/\[quote\](.*?)\[\/quote\]/ism", $attacheddata, $matches))