Minor improvements (#1253)

* Minor improvements

* Update .gitignore

* Update admin_smilies.php

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2023-12-23 14:20:06 +07:00 committed by GitHub
commit 94cb6ab73c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 33 additions and 50 deletions

View file

@ -275,18 +275,18 @@ function display_attachments($post_id)
}
if ($thumbnail) {
// Get the thumbnail image
$thumbnail_filename = $upload_dir . '/' . THUMB_DIR . '/t_' . basename($attachments['_' . $post_id][$i]['physical_filename']);
// Checks the thumbnail existence
if (!is_file($thumbnail_filename)) {
continue;
}
// Images, but display Thumbnail
if ($attach_config['upload_dir'][0] == '/' || ($attach_config['upload_dir'][0] != '/' && $attach_config['upload_dir'][1] == ':')) {
$thumb_source = BB_ROOT . DL_URL . $attachments['_' . $post_id][$i]['attach_id'] . '&thumb=1';
} else {
// Get the thumbnail image
$thumbnail_filename = $upload_dir . '/' . THUMB_DIR . '/t_' . basename($attachments['_' . $post_id][$i]['physical_filename']);
// Checks the thumbnail existence
if (!is_file($thumbnail_filename)) {
continue;
}
$thumb_source = $thumbnail_filename;
}