mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Show pin & unpin actions in log actions (#857)
This commit is contained in:
parent
6e1d7c3538
commit
da08532898
4 changed files with 32 additions and 4 deletions
|
@ -224,6 +224,8 @@ if ($log_rowset) {
|
|||
case $log_type['mod_topic_lock']:
|
||||
case $log_type['mod_topic_unlock']:
|
||||
case $log_type['mod_post_delete']:
|
||||
case $log_type['mod_post_pin']:
|
||||
case $log_type['mod_post_unpin']:
|
||||
case $log_type['mod_topic_split']:
|
||||
// topic_title
|
||||
if (!empty($row['log_topic_title'])) {
|
||||
|
|
|
@ -2551,6 +2551,8 @@ $lang['LOG_ACTION']['LOG_TYPE'] = array(
|
|||
'mod_topic_unlock' => 'Topic:<br /> <b>opened</b>',
|
||||
'mod_topic_split' => 'Topic:<br /> <b>split</b>',
|
||||
'mod_post_delete' => 'Post:<br /> <b>deleted</b>',
|
||||
'mod_post_pin' => 'Post:<br /> <b>pinned</b>',
|
||||
'mod_post_unpin' => 'Post:<br /> <b>unpinned</b>',
|
||||
'adm_user_delete' => 'User:<br /> <b>deleted</b>',
|
||||
'adm_user_ban' => 'User:<br /> <b>ban</b>',
|
||||
'adm_user_unban' => 'User:<br /> <b>unban</b>',
|
||||
|
|
22
modcp.php
22
modcp.php
|
@ -709,6 +709,17 @@ switch ($mode) {
|
|||
WHERE topic_id IN($topic_csv)
|
||||
");
|
||||
|
||||
// Log action
|
||||
$type = ($pin) ? 'mod_post_pin' : 'mod_post_unpin';
|
||||
|
||||
foreach ($log_topics as $topic_id => $topic_title) {
|
||||
$log_action->mod($type, array(
|
||||
'forum_id' => $forum_id,
|
||||
'topic_id' => $topic_id,
|
||||
'topic_title' => $topic_title,
|
||||
));
|
||||
}
|
||||
|
||||
$msg = ($pin) ? $lang['POST_PINNED'] : $lang['POST_UNPINNED'];
|
||||
bb_die(return_msg_mcp($msg));
|
||||
} elseif ($topic_id) {
|
||||
|
@ -739,6 +750,17 @@ switch ($mode) {
|
|||
WHERE topic_id IN($topic_csv)
|
||||
");
|
||||
|
||||
// Log action
|
||||
$type = ($pin) ? 'mod_post_pin' : 'mod_post_unpin';
|
||||
|
||||
foreach ($log_topics as $topic_id => $topic_title) {
|
||||
$log_action->mod($type, array(
|
||||
'forum_id' => $forum_id,
|
||||
'topic_id' => $topic_id,
|
||||
'topic_title' => $topic_title,
|
||||
));
|
||||
}
|
||||
|
||||
$msg = ($pin) ? $lang['POST_PINNED'] : $lang['POST_UNPINNED'];
|
||||
bb_die(return_msg_mcp($msg));
|
||||
}
|
||||
|
|
|
@ -21,10 +21,12 @@ class LogAction
|
|||
'mod_topic_lock' => 3,
|
||||
'mod_topic_unlock' => 4,
|
||||
'mod_post_delete' => 5,
|
||||
'mod_topic_split' => 6,
|
||||
'adm_user_delete' => 7,
|
||||
'adm_user_ban' => 8,
|
||||
'adm_user_unban' => 9,
|
||||
'mod_post_pin' => 6,
|
||||
'mod_post_unpin' => 7,
|
||||
'mod_topic_split' => 8,
|
||||
'adm_user_delete' => 9,
|
||||
'adm_user_ban' => 10,
|
||||
'adm_user_unban' => 11,
|
||||
];
|
||||
public $log_type_select = [];
|
||||
public $log_disabled = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue