mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 13:24:01 -07:00
Minor improvements (#1253)
* Minor improvements * Update .gitignore * Update admin_smilies.php * Update CHANGELOG.md
This commit is contained in:
parent
cb06f82f06
commit
94cb6ab73c
6 changed files with 33 additions and 50 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue