mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge branch '3.2.x'
This commit is contained in:
commit
3bdd554b71
1 changed files with 4 additions and 5 deletions
|
@ -426,6 +426,8 @@ function change_topic_type($action, $topic_ids)
|
||||||
|
|
||||||
if (confirm_box(true))
|
if (confirm_box(true))
|
||||||
{
|
{
|
||||||
|
$db->sql_transaction('begin');
|
||||||
|
|
||||||
$sql = 'UPDATE ' . TOPICS_TABLE . "
|
$sql = 'UPDATE ' . TOPICS_TABLE . "
|
||||||
SET topic_type = $new_topic_type
|
SET topic_type = $new_topic_type
|
||||||
WHERE " . $db->sql_in_set('topic_id', $topic_ids);
|
WHERE " . $db->sql_in_set('topic_id', $topic_ids);
|
||||||
|
@ -437,13 +439,10 @@ function change_topic_type($action, $topic_ids)
|
||||||
$sql = 'DELETE FROM ' . TOPICS_TABLE . '
|
$sql = 'DELETE FROM ' . TOPICS_TABLE . '
|
||||||
WHERE ' . $db->sql_in_set('topic_moved_id', $topic_ids);
|
WHERE ' . $db->sql_in_set('topic_moved_id', $topic_ids);
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
$sql = 'UPDATE ' . TOPICS_TABLE . "
|
|
||||||
SET topic_type = $new_topic_type
|
|
||||||
WHERE " . $db->sql_in_set('topic_id', $topic_ids);
|
|
||||||
$db->sql_query($sql);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$db->sql_transaction('commit');
|
||||||
|
|
||||||
$success_msg = (count($topic_ids) == 1) ? 'TOPIC_TYPE_CHANGED' : 'TOPICS_TYPE_CHANGED';
|
$success_msg = (count($topic_ids) == 1) ? 'TOPIC_TYPE_CHANGED' : 'TOPICS_TYPE_CHANGED';
|
||||||
|
|
||||||
if (count($topic_ids))
|
if (count($topic_ids))
|
||||||
|
|
Loading…
Add table
Reference in a new issue