mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Update displaying.php
This commit is contained in:
parent
08be0b1a86
commit
a1a57d1eee
@ -196,6 +196,12 @@ function display_attachments($post_id)
|
||||
$filename = $upload_dir . '/' . basename($attachments['_' . $post_id][$i]['physical_filename']);
|
||||
$thumbnail_filename = $upload_dir . '/' . THUMB_DIR . '/t_' . basename($attachments['_' . $post_id][$i]['physical_filename']);
|
||||
|
||||
// Check the file existence
|
||||
if (!is_file($filename))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$upload_image = '';
|
||||
|
||||
if ($attach_config['upload_img'] && empty($upload_icons[$attachments['_' . $post_id][$i]['extension']]))
|
||||
@ -305,6 +311,12 @@ function display_attachments($post_id)
|
||||
|
||||
if ($thumbnail)
|
||||
{
|
||||
// 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] == ':'))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user