1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-25 04:23:38 +01:00

[ticket/8065] Add an option to lock topics while moving them.

PHPBB3-8065
This commit is contained in:
Joas Schilling 2010-08-18 19:43:05 -04:00 committed by Andreas Fischer
parent bafe3d9484
commit b526fb9678
2 changed files with 10 additions and 0 deletions

View File

@ -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)
);

View File

@ -14,6 +14,7 @@
<dt><label>{L_SELECT_DESTINATION_FORUM}:</label></dt>
<dd><select name="to_forum_id">{S_FORUM_SELECT}</select></dd>
<!-- IF S_CAN_LEAVE_SHADOW --><dd><label for="move_leave_shadow"><input type="checkbox" name="move_leave_shadow" id="move_leave_shadow" checked="checked" />{L_LEAVE_SHADOW}</label></dd><!-- ENDIF -->
<!-- IF S_CAN_LOCK_TOPIC --><dd><label for="move_lock_topics"><input type="checkbox" name="move_lock_topics" id="move_lock_topics" />{L_LOCK_TOPIC}</label></dd><!-- ENDIF -->
</dl>
<dl class="fields2">
<dt>&nbsp;</dt>