aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp/mcp_main.php
diff options
context:
space:
mode:
authorGraham Eames <grahamje@users.sourceforge.net>2006-10-11 20:37:53 +0000
committerGraham Eames <grahamje@users.sourceforge.net>2006-10-11 20:37:53 +0000
commit152a653fd48e1af8841e5e621bcc7f6699c7aa5e (patch)
treebc6dca581d435c1aecbbc9c15707fd2e3d87b677 /phpBB/includes/mcp/mcp_main.php
parent31463d2ccc1b2df8ed41ed055e57059f50b9a960 (diff)
downloadforums-152a653fd48e1af8841e5e621bcc7f6699c7aa5e.tar
forums-152a653fd48e1af8841e5e621bcc7f6699c7aa5e.tar.gz
forums-152a653fd48e1af8841e5e621bcc7f6699c7aa5e.tar.bz2
forums-152a653fd48e1af8841e5e621bcc7f6699c7aa5e.tar.xz
forums-152a653fd48e1af8841e5e621bcc7f6699c7aa5e.zip
#3980
git-svn-id: file:///svn/phpbb/trunk@6481 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/mcp/mcp_main.php')
-rw-r--r--phpBB/includes/mcp/mcp_main.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index 2d298a4108..1fe9233ba9 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -483,8 +483,17 @@ function mcp_move_topic($topic_ids)
$forum_ids[] = $row['forum_id'];
add_log('mod', $to_forum_id, $topic_id, 'LOG_MOVE', $row['forum_name']);
+ // If we have moved a global announcement, we need to correct the topic type
+ if ($row['topic_type'] == POST_GLOBAL)
+ {
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_type = ' . POST_ANNOUNCE . '
+ WHERE topic_id = ' . (int) $row['topic_id'];
+ $db->sql_query($sql);
+ }
+
// Leave a redirection if required and only if the topic is visible to users
- if ($leave_shadow && $row['topic_approved'])
+ if ($leave_shadow && $row['topic_approved'] && $row['topic_type'] != POST_GLOBAL)
{
$shadow = array(
'forum_id' => (int) $row['forum_id'],