mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
Merge 978d03b8e8
into 16e28a5c41
This commit is contained in:
commit
0eaa70125b
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_pin']:
|
||||||
case $log_type['mod_post_unpin']:
|
case $log_type['mod_post_unpin']:
|
||||||
case $log_type['mod_topic_split']:
|
case $log_type['mod_topic_split']:
|
||||||
|
case $log_type['mod_topic_attach_updated']:
|
||||||
// topic_title
|
// topic_title
|
||||||
if (!empty($row['log_topic_title'])) {
|
if (!empty($row['log_topic_title'])) {
|
||||||
$topic_title = $row['log_topic_title'];
|
$topic_title = $row['log_topic_title'];
|
||||||
|
|
|
@ -2835,6 +2835,7 @@ $lang['LOG_ACTION']['LOG_TYPE'] = [
|
||||||
'mod_topic_tor_unregister' => 'Topic:<br /> <b>torrent unregistered</b>',
|
'mod_topic_tor_unregister' => 'Topic:<br /> <b>torrent unregistered</b>',
|
||||||
'mod_topic_tor_register' => 'Topic:<br /> <b>torrent registered</b>',
|
'mod_topic_tor_register' => 'Topic:<br /> <b>torrent registered</b>',
|
||||||
'mod_topic_tor_delete' => 'Topic:<br /> <b>torrent deleted</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_topic_renamed' => 'Topic:<br /> <b>renamed</b>',
|
||||||
'mod_post_delete' => 'Post:<br /> <b>deleted</b>',
|
'mod_post_delete' => 'Post:<br /> <b>deleted</b>',
|
||||||
'mod_post_pin' => 'Post:<br /> <b>pinned</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) {
|
if (!$error_msg) {
|
||||||
\TorrentPier\Legacy\Post::user_notification($mode, $post_data, $post_info['topic_title'], $forum_id, $topic_id, $notify_user);
|
\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') {
|
if ($mode == 'newtopic' || $mode == 'reply') {
|
||||||
|
|
|
@ -475,18 +475,25 @@ class Attach
|
||||||
// Delete the Old Attachment
|
// Delete the Old Attachment
|
||||||
unlink_attach($row['physical_filename']);
|
unlink_attach($row['physical_filename']);
|
||||||
|
|
||||||
|
$attachment_type = $lang['ATTACHMENT'];
|
||||||
|
|
||||||
if ((int)$row['thumbnail'] === 1) {
|
if ((int)$row['thumbnail'] === 1) {
|
||||||
unlink_attach($row['physical_filename'], MODE_THUMBNAIL);
|
unlink_attach($row['physical_filename'], MODE_THUMBNAIL);
|
||||||
|
$attachment_type = $lang['ATTACHMENT_THUMBNAIL'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: log action - torrent updated
|
|
||||||
|
|
||||||
//bt
|
//bt
|
||||||
if ($this->attachment_extension_list[$actual_element] === TORRENT_EXT && $attachments[$actual_element]['tracker_status']) {
|
if ($this->attachment_extension_list[$actual_element] === TORRENT_EXT && $attachments[$actual_element]['tracker_status']) {
|
||||||
Torrent::tracker_unregister($attachment_id);
|
Torrent::tracker_unregister($attachment_id);
|
||||||
|
$attachment_type = $lang['TORRENT'];
|
||||||
}
|
}
|
||||||
//bt end
|
//bt end
|
||||||
|
|
||||||
|
\define('ATTACHMENT_UPDATED', [
|
||||||
|
'status' => true,
|
||||||
|
'attachment_type' => $attachment_type
|
||||||
|
]);
|
||||||
|
|
||||||
// Make sure it is displayed
|
// Make sure it is displayed
|
||||||
$this->attachment_list[$actual_element] = $this->attach_filename;
|
$this->attachment_list[$actual_element] = $this->attach_filename;
|
||||||
$this->attachment_comment_list[$actual_element] = $comment;
|
$this->attachment_comment_list[$actual_element] = $comment;
|
||||||
|
|
|
@ -35,6 +35,7 @@ class LogAction
|
||||||
'mod_topic_tor_unregister' => 17,
|
'mod_topic_tor_unregister' => 17,
|
||||||
'mod_topic_tor_register' => 18,
|
'mod_topic_tor_register' => 18,
|
||||||
'mod_topic_tor_delete' => 19,
|
'mod_topic_tor_delete' => 19,
|
||||||
|
'mod_topic_attach_updated' => 20,
|
||||||
];
|
];
|
||||||
public $log_type_select = [];
|
public $log_type_select = [];
|
||||||
public $log_disabled = false;
|
public $log_disabled = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue