mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -07:00
Updated
This commit is contained in:
parent
3bbf240d75
commit
d426b01c2a
2 changed files with 10 additions and 2 deletions
|
@ -369,12 +369,13 @@ if (($delete || $mode == 'delete') && !$confirm) {
|
|||
if (!$error_msg) {
|
||||
\TorrentPier\Legacy\Post::user_notification($mode, $post_data, $post_info['topic_title'], $forum_id, $topic_id, $notify_user);
|
||||
|
||||
if (defined('ATTACHMENT_UPDATED')) {
|
||||
if (defined('ATTACHMENT_UPDATED') && ATTACHMENT_UPDATED['status']) {
|
||||
global $log_action;
|
||||
$log_action->mod('mod_topic_attach_updated', [
|
||||
'forum_id' => $forum_id,
|
||||
'topic_id' => $topic_id,
|
||||
'topic_title' => $post_info['topic_title'],
|
||||
'log_msg' => sprintf('Attachment type: %s', ATTACHMENT_UPDATED['attachment_type'])
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -475,17 +475,24 @@ class Attach
|
|||
// Delete the Old Attachment
|
||||
unlink_attach($row['physical_filename']);
|
||||
|
||||
$attachment_type = $lang['ATTACHMENT'];
|
||||
|
||||
if ((int)$row['thumbnail'] === 1) {
|
||||
unlink_attach($row['physical_filename'], MODE_THUMBNAIL);
|
||||
$attachment_type = $lang['ATTACHMENT_THUMBNAIL'];
|
||||
}
|
||||
|
||||
//bt
|
||||
if ($this->attachment_extension_list[$actual_element] === TORRENT_EXT && $attachments[$actual_element]['tracker_status']) {
|
||||
Torrent::tracker_unregister($attachment_id);
|
||||
$attachment_type = $lang['TORRENT'];
|
||||
}
|
||||
//bt end
|
||||
|
||||
\define('ATTACHMENT_UPDATED', true);
|
||||
\define('ATTACHMENT_UPDATED', [
|
||||
'status' => true,
|
||||
'attachment_type' => $attachment_type
|
||||
]);
|
||||
|
||||
// Make sure it is displayed
|
||||
$this->attachment_list[$actual_element] = $this->attach_filename;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue