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]);