mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-19 01:38:54 +00:00
Merge branch 'ticket/nickvergessen/8065' into develop
* ticket/nickvergessen/8065: [ticket/8065] Add an option to lock topics while moving them.
This commit is contained in:
commit
426139ae77
2 changed files with 10 additions and 0 deletions
|
@ -660,6 +660,14 @@ function mcp_move_topic($topic_ids)
|
||||||
// Move topics, but do not resync yet
|
// Move topics, but do not resync yet
|
||||||
move_topics($topic_ids, $to_forum_id, false);
|
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);
|
$forum_ids = array($to_forum_id);
|
||||||
foreach ($topic_data as $topic_id => $row)
|
foreach ($topic_data as $topic_id => $row)
|
||||||
{
|
{
|
||||||
|
@ -757,6 +765,7 @@ function mcp_move_topic($topic_ids)
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'S_FORUM_SELECT' => make_forum_select($to_forum_id, $forum_id, false, true, true, true),
|
'S_FORUM_SELECT' => make_forum_select($to_forum_id, $forum_id, false, true, true, true),
|
||||||
'S_CAN_LEAVE_SHADOW' => true,
|
'S_CAN_LEAVE_SHADOW' => true,
|
||||||
|
'S_CAN_LOCK_TOPIC' => ($auth->acl_get('m_lock', $to_forum_id)) ? true : false,
|
||||||
'ADDITIONAL_MSG' => $additional_msg)
|
'ADDITIONAL_MSG' => $additional_msg)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
<dt><label>{L_SELECT_DESTINATION_FORUM}:</label></dt>
|
<dt><label>{L_SELECT_DESTINATION_FORUM}:</label></dt>
|
||||||
<dd><select name="to_forum_id">{S_FORUM_SELECT}</select></dd>
|
<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_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>
|
||||||
<dl class="fields2">
|
<dl class="fields2">
|
||||||
<dt> </dt>
|
<dt> </dt>
|
||||||
|
|
Loading…
Add table
Reference in a new issue