diff options
author | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-04-23 22:47:28 +0000 |
---|---|---|
committer | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-04-23 22:47:28 +0000 |
commit | 716baed055c6c9b2a146e4693ab1b071c2275b77 (patch) | |
tree | 29ea43ef101e62906f7d383b59609345b6858bde | |
parent | 3a4af0ea4ff060bee997f5dea955bda4265e1c51 (diff) | |
download | forums-716baed055c6c9b2a146e4693ab1b071c2275b77.tar forums-716baed055c6c9b2a146e4693ab1b071c2275b77.tar.gz forums-716baed055c6c9b2a146e4693ab1b071c2275b77.tar.bz2 forums-716baed055c6c9b2a146e4693ab1b071c2275b77.tar.xz forums-716baed055c6c9b2a146e4693ab1b071c2275b77.zip |
Changed: polls are forked with topics. Votes are not, which means users will have to vote again.
git-svn-id: file:///svn/phpbb/trunk@3938 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/language/en/lang_main.php | 3 | ||||
-rw-r--r-- | phpBB/mcp.php | 25 |
2 files changed, 23 insertions, 5 deletions
diff --git a/phpBB/language/en/lang_main.php b/phpBB/language/en/lang_main.php index 5fcb6d94f0..a7c50e2184 100644 --- a/phpBB/language/en/lang_main.php +++ b/phpBB/language/en/lang_main.php @@ -1040,6 +1040,7 @@ $lang = array_merge($lang, array( 'OTHER_USERS' => 'Users posting from this IP', 'IP_INFO' => 'IP Information', 'LOOKUP_IP' => 'Look up IP', + 'LOOKUP_ALL' => 'Look up all IP', // ------ 'LOGS_CURRENT_TOPIC' => 'Currently viewing logs for:', @@ -1080,7 +1081,7 @@ $lang = array_merge($lang, array( 'TOPICS_MOVED_SUCCESS' => 'The selected topics have been successfully moved', 'FORK' => 'Copy', - 'FORK_EXPLAIN' => 'Using the form below you can leave a copy of selected thread(s) in the forum you choose. Please note that posts will automatically be approved, and attachments and polls will not be included in the copy', + 'FORK_EXPLAIN' => 'Using the form below you can leave a copy of selected thread(s) in the forum you choose. Please note that posts will automatically be approved and attachments will not be included in the copy. If applicable, polls will be copied as well while corresponding votes will not', 'TOPIC_FORKED_SUCCESS' => 'The selected topic has been successfully copied', 'TOPICS_FORKED_SUCCESS' => 'The selected topics have been successfully copied', diff --git a/phpBB/mcp.php b/phpBB/mcp.php index 8fd301ffc2..f32ffcd48e 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -617,7 +617,7 @@ switch ($mode) } $total_posts = 0; - $new_topic_id_list = array(); + $new_topic_id_list = $post_rows = array(); foreach ($topic_data as $topic_id => $topic_row) { $sql_ary = array( @@ -634,14 +634,30 @@ switch ($mode) 'topic_first_poster_name' => (string) $topic_row['topic_first_poster_name'], 'topic_last_poster_id' => (int) $topic_row['topic_last_poster_id'], 'topic_last_poster_name' => (string) $topic_row['topic_last_poster_name'], - 'topic_last_post_time' => (int) $topic_row['topic_last_post_time'] + 'topic_last_post_time' => (int) $topic_row['topic_last_post_time'], + 'poll_title' => (string) $topic_row['poll_title'], + 'poll_start' => (int) $topic_row['poll_start'], + 'poll_length' => (int) $topic_row['poll_length'] ); $db->sql_query('INSERT INTO ' . TOPICS_TABLE . $db->sql_build_array('INSERT', $sql_ary)); $new_topic_id = $db->sql_nextid(); $new_topic_id_list[$new_topic_id] = $topic_id; - $post_rows = array(); + if ($topic_row['poll_start']) + { + $poll_rows = array(); + + $result = $db->sql_query('SELECT * FROM ' . POLL_OPTIONS_TABLE . ' WHERE topic_id = ' . $topic_id); + while ($row = $db->sql_fetchrow($result)) + { + $sql = 'INSERT INTO ' . POLL_OPTIONS_TABLE . ' (poll_option_id, topic_id, poll_option_text, poll_option_total) + VALUES (' . $row['poll_option_id'] . ', ' . $new_topic_id . ", '" . $db->sql_escape($row['poll_option_text']) . "', 0)"; + + $db->sql_query($sql); + } + } + $sql = 'SELECT * FROM ' . POSTS_TABLE . " WHERE topic_id = $topic_id @@ -918,7 +934,7 @@ switch ($mode) mcp_header('confirm_body.html'); $template->assign_vars(array( - 'MESSAGE_TITLE' => $user->lang['Confirm'], + 'MESSAGE_TITLE' => $user->lang['CONFIRM'], 'MESSAGE_TEXT' => (count($post_id_list) == 1) ? $user->lang['CONFIRM_DELETE_POST'] : $user->lang['CONFIRM_DELETE_POSTS'], 'S_CONFIRM_ACTION' => "mcp.$phpEx$SID&mode=disapprove", @@ -1013,6 +1029,7 @@ switch ($mode) // Resync last post infos, replies count et caetera sync('topic', 'topic_id', $topic_id_list); + sync('topic_attachment', 'topic_id', $topic_id_list); foreach ($user_posts as $user_id => $post_count) { |