Merge pull request #9243 from annando/preview-text

Only display redundant preview data with preview picture
This commit is contained in:
Hypolite Petovan 2020-09-19 15:42:40 -04:00 zatwierdzone przez GitHub
commit b9a61e5bfb
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 8 dodań i 8 usunięć

Wyświetl plik

@ -134,14 +134,6 @@ class PageInfo
$text = "[attachment type='" . $data['type'] . "'";
if (empty($data['text'])) {
$data['text'] = $data['title'];
}
if (empty($data['text'])) {
$data['text'] = $data['url'];
}
if (!empty($data['url'])) {
$text .= " url='" . $data['url'] . "'";
}
@ -160,6 +152,14 @@ class PageInfo
$text .= " image='" . $preview . "'";
} else {
$text .= " preview='" . $preview . "'";
if (empty($data['text'])) {
$data['text'] = $data['title'];
}
if (empty($data['text'])) {
$data['text'] = $data['url'];
}
}
}