diff options
| author | Nils Adermann <naderman@naderman.de> | 2014-04-10 14:19:13 -0700 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2014-04-10 14:19:13 -0700 |
| commit | 90ebd49a2b64b731c037dceb5c85d3d81b152947 (patch) | |
| tree | dc90393b286739907fdbf5a7039b89118f1ce41d /phpBB/includes | |
| parent | 5de4d181ee3c9d4dda9aaa86c608a86f8781ac7c (diff) | |
| parent | 88c47c251d830fb46da024cfe5a43a488cc1ca4a (diff) | |
| download | forums-90ebd49a2b64b731c037dceb5c85d3d81b152947.tar forums-90ebd49a2b64b731c037dceb5c85d3d81b152947.tar.gz forums-90ebd49a2b64b731c037dceb5c85d3d81b152947.tar.bz2 forums-90ebd49a2b64b731c037dceb5c85d3d81b152947.tar.xz forums-90ebd49a2b64b731c037dceb5c85d3d81b152947.zip | |
Merge remote-tracking branch 'github-nickvergessen/ticket/12373' into develop-ascraeus
* github-nickvergessen/ticket/12373:
[ticket/12373] Add to and from forum_id to LOG_MOVE log entries
Diffstat (limited to 'phpBB/includes')
| -rw-r--r-- | phpBB/includes/mcp/mcp_main.php | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index 016094c5d4..55440bf192 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -415,9 +415,8 @@ function change_topic_type($action, $topic_ids) */ function mcp_move_topic($topic_ids) { - global $auth, $user, $db, $template; + global $auth, $user, $db, $template, $phpbb_log, $request; global $phpEx, $phpbb_root_path; - global $request; // Here we limit the operation to one forum only $forum_id = check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_move'), true); @@ -525,9 +524,19 @@ function mcp_move_topic($topic_ids) $forum_ids = array($to_forum_id); foreach ($topic_data as $topic_id => $row) { - // Get the list of forums to resync, add a log entry + // Get the list of forums to resync $forum_ids[] = $row['forum_id']; - add_log('mod', $to_forum_id, $topic_id, 'LOG_MOVE', $row['forum_name'], $forum_data['forum_name']); + + // We add the $to_forum_id twice, because 'forum_id' is updated + // when the topic is moved again later. + $phpbb_log->add('mod', $user->data['user_id'], $user->ip, 'LOG_MOVE', false, array( + 'forum_id' => (int) $to_forum_id, + 'topic_id' => (int) $topic_id, + $row['forum_name'], + $forum_data['forum_name'], + (int) $row['forum_id'], + (int) $forum_data['forum_id'], + )); // Leave a redirection if required and only if the topic is visible to users if ($leave_shadow && $row['topic_visibility'] == ITEM_APPROVED && $row['topic_type'] != POST_GLOBAL) |
