diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2010-08-18 19:43:05 -0400 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2011-01-30 01:23:20 +0100 |
commit | b526fb96784bb657626bb2c11cc9c4d2603350f2 (patch) | |
tree | 6293dee6d4cea9175f1c4a48fc9c4d9946657920 /phpBB/includes/mcp/mcp_main.php | |
parent | bafe3d9484037049a766fc1f9d728979d2d0483a (diff) | |
download | forums-b526fb96784bb657626bb2c11cc9c4d2603350f2.tar forums-b526fb96784bb657626bb2c11cc9c4d2603350f2.tar.gz forums-b526fb96784bb657626bb2c11cc9c4d2603350f2.tar.bz2 forums-b526fb96784bb657626bb2c11cc9c4d2603350f2.tar.xz forums-b526fb96784bb657626bb2c11cc9c4d2603350f2.zip |
[ticket/8065] Add an option to lock topics while moving them.
PHPBB3-8065
Diffstat (limited to 'phpBB/includes/mcp/mcp_main.php')
-rw-r--r-- | phpBB/includes/mcp/mcp_main.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index a178a3fafa..db7bc7c7ea 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -660,6 +660,14 @@ function mcp_move_topic($topic_ids) // Move topics, but do not resync yet move_topics($topic_ids, $to_forum_id, false); + if ($request->is_set_post('move_lock_topics') && $auth->acl_get('m_lock', $to_forum_id)) + { + $sql = 'UPDATE ' . TOPICS_TABLE . ' + SET topic_status = ' . ITEM_LOCKED . ' + WHERE ' . $db->sql_in_set('topic_id', $topic_ids); + $db->sql_query($sql); + } + $forum_ids = array($to_forum_id); foreach ($topic_data as $topic_id => $row) { @@ -757,6 +765,7 @@ function mcp_move_topic($topic_ids) $template->assign_vars(array( 'S_FORUM_SELECT' => make_forum_select($to_forum_id, $forum_id, false, true, true, true), 'S_CAN_LEAVE_SHADOW' => true, + 'S_CAN_LOCK_TOPIC' => ($auth->acl_get('m_lock', $to_forum_id)) ? true : false, 'ADDITIONAL_MSG' => $additional_msg) ); |