mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Don't update download counter if attachment not exists (#1345)
* Don't update download counter if attachment not exists * Update CHANGELOG.md * Update CHANGELOG.md * Updated
This commit is contained in:
parent
d6a3598d04
commit
8b78253ddc
5 changed files with 381 additions and 25 deletions
|
@ -181,11 +181,6 @@ function display_attachments($post_id)
|
|||
for ($i = 0; $i < $num_attachments; $i++) {
|
||||
$filename = $upload_dir . '/' . basename($attachments['_' . $post_id][$i]['physical_filename']);
|
||||
|
||||
// Checks the file existence
|
||||
if (!is_file($filename)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$upload_image = '';
|
||||
if ($attach_config['upload_img'] && empty($upload_icons[$attachments['_' . $post_id][$i]['extension']])) {
|
||||
$upload_image = '<img src="' . $attach_config['upload_img'] . '" alt="" border="0" />';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue