mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 21:33:54 -07:00
Merge 978d03b8e8
into 07e35c0205
This commit is contained in:
commit
422cf63dba
5 changed files with 22 additions and 2 deletions
|
@ -235,6 +235,7 @@ if ($log_rowset) {
|
|||
case $log_type['mod_post_pin']:
|
||||
case $log_type['mod_post_unpin']:
|
||||
case $log_type['mod_topic_split']:
|
||||
case $log_type['mod_topic_attach_updated']:
|
||||
// topic_title
|
||||
if (!empty($row['log_topic_title'])) {
|
||||
$topic_title = $row['log_topic_title'];
|
||||
|
|
|
@ -2825,6 +2825,7 @@ $lang['LOG_ACTION']['LOG_TYPE'] = [
|
|||
'mod_topic_tor_unregister' => 'Topic:<br /> <b>torrent unregistered</b>',
|
||||
'mod_topic_tor_register' => 'Topic:<br /> <b>torrent registered</b>',
|
||||
'mod_topic_tor_delete' => 'Topic:<br /> <b>torrent deleted</b>',
|
||||
'mod_topic_attach_updated' => 'Topic:<br /> <b>attachment updated</b>',
|
||||
'mod_topic_renamed' => 'Topic:<br /> <b>renamed</b>',
|
||||
'mod_post_delete' => 'Post:<br /> <b>deleted</b>',
|
||||
'mod_post_pin' => 'Post:<br /> <b>pinned</b>',
|
||||
|
|
10
posting.php
10
posting.php
|
@ -372,6 +372,16 @@ 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') && 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'])
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
if ($mode == 'newtopic' || $mode == 'reply') {
|
||||
|
|
|
@ -475,18 +475,25 @@ 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'];
|
||||
}
|
||||
|
||||
// todo: log action - torrent updated
|
||||
|
||||
//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', [
|
||||
'status' => true,
|
||||
'attachment_type' => $attachment_type
|
||||
]);
|
||||
|
||||
// Make sure it is displayed
|
||||
$this->attachment_list[$actual_element] = $this->attach_filename;
|
||||
$this->attachment_comment_list[$actual_element] = $comment;
|
||||
|
|
|
@ -35,6 +35,7 @@ class LogAction
|
|||
'mod_topic_tor_unregister' => 17,
|
||||
'mod_topic_tor_register' => 18,
|
||||
'mod_topic_tor_delete' => 19,
|
||||
'mod_topic_attach_updated' => 20,
|
||||
];
|
||||
public $log_type_select = [];
|
||||
public $log_disabled = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue