Merge pull request #3953 from annando/preview-again

Show the preview picture even if the posting contains the huge image
This commit is contained in:
Hypolite Petovan 2017-11-25 11:06:23 -05:00 committed by GitHub
commit e6a8cac147
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,7 +52,10 @@ function bb_attachment($Text, $simplehtml = false, $tryoembed = true) {
$data["title"] = str_replace(array("http://", "https://"), "", $data["title"]);
}
if (((strpos($data["text"], "[img=") !== false) || (strpos($data["text"], "[img]") !== false)) && ($data["image"] != "")) {
if (((strpos($data["text"], "[img=") !== false)
|| (strpos($data["text"], "[img]") !== false)
|| Config::get('system', 'always_show_preview'))
&& ($data["image"] != "")) {
$data["preview"] = $data["image"];
$data["image"] = "";
}