From: Michael Vogel Date: Mon, 18 Apr 2016 10:13:54 +0000 (+0200) Subject: Attachments: Better handling of preview pictures X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=999ef7f6793f790aefdf8a40e1b0c5cb30b9be7e;p=friendica.git Attachments: Better handling of preview pictures --- diff --git a/include/plaintext.php b/include/plaintext.php index a6738ca93b..a4f6b6bf68 100644 --- a/include/plaintext.php +++ b/include/plaintext.php @@ -1,4 +1,7 @@ = 500) AND ($picturedata[0] >= $picturedata[1])) + $post["image"] = $matches[1]; + else + $post["preview"] = $matches[1]; + } if (preg_match("/\[bookmark\=([$URLSearchString]*)\](.*?)\[\/bookmark\]/ism", $attacheddata, $matches)) { $post["url"] = $matches[1]; @@ -144,9 +154,7 @@ function get_attachment_data($body) { $preview = $matches[1]; } - if (($image == "") AND ($preview != "")) - $data["image"] = $preview; - else + if ($preview != "") $data["preview"] = $preview; $data["description"] = trim($match[3]);