mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Show renamed topic actions in log actions (#860)
This commit is contained in:
parent
fe742de211
commit
597c192cc4
4 changed files with 21 additions and 10 deletions
|
@ -11,7 +11,7 @@ if (!defined('IN_AJAX')) {
|
|||
die(basename(__FILE__));
|
||||
}
|
||||
|
||||
global $userdata, $bb_cfg, $lang, $datastore;
|
||||
global $userdata, $bb_cfg, $lang, $datastore, $log_action;
|
||||
|
||||
$mode = (string)$this->request['mode'];
|
||||
|
||||
|
@ -36,8 +36,8 @@ switch ($mode) {
|
|||
|
||||
case 'edit_topic_title':
|
||||
$topic_id = (int)$this->request['topic_id'];
|
||||
$topic_title = (string)$this->request['topic_title'];
|
||||
$new_title = clean_title($topic_title);
|
||||
$old_title = get_topic_title($topic_id);
|
||||
$new_title = clean_title((string)$this->request['topic_title']);
|
||||
|
||||
if (!$topic_id) {
|
||||
$this->ajax_die($lang['INVALID_TOPIC_ID']);
|
||||
|
@ -68,6 +68,14 @@ switch ($mode) {
|
|||
$datastore->update('network_news');
|
||||
}
|
||||
|
||||
// Log action
|
||||
$log_action->mod('mod_topic_renamed', array(
|
||||
'forum_id' => $t_data['forum_id'],
|
||||
'topic_id' => $topic_id,
|
||||
'topic_title' => $old_title,
|
||||
'topic_title_new' => $new_title,
|
||||
));
|
||||
|
||||
$this->response['topic_id'] = $topic_id;
|
||||
$this->response['topic_title'] = $new_title;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue