diff options
author | Nathan Guse <nathaniel.guse@gmail.com> | 2013-01-15 11:31:39 -0600 |
---|---|---|
committer | Nathan Guse <nathaniel.guse@gmail.com> | 2013-01-15 11:31:39 -0600 |
commit | 51e0f002eeaf2d55a63feee66ccb37d689f46f55 (patch) | |
tree | 21590506df83029d97a02ccaafa86c085f8c568f /phpBB/includes/mcp/mcp_main.php | |
parent | 44fcec520f785d18d3cd3b19e26db977f23b844c (diff) | |
parent | a2f6e494f37914352b0bb72d5a84904d3f2c51a3 (diff) | |
download | forums-51e0f002eeaf2d55a63feee66ccb37d689f46f55.tar forums-51e0f002eeaf2d55a63feee66ccb37d689f46f55.tar.gz forums-51e0f002eeaf2d55a63feee66ccb37d689f46f55.tar.bz2 forums-51e0f002eeaf2d55a63feee66ccb37d689f46f55.tar.xz forums-51e0f002eeaf2d55a63feee66ccb37d689f46f55.zip |
Merge branch 'develop' of github.com:phpbb/phpbb3 into ticket/11103
# By Oleg Pudeyev (37) and others
# Via Oleg Pudeyev (24) and others
* 'develop' of github.com:phpbb/phpbb3: (179 commits)
[ticket/11323] Add tests for inclusion of defined variables
[ticket/11324] Add PHP 5.5 environment to travis and allow it to fail.
[ticket/11321] Recreate schema files with develop/create_schema_files.php
[ticket/11320] Include functions file as we need phpbb_convert_30_dbms_to_31
[ticket/11313] Use correct object el instead of eel in alt_text callback
[ticket/11301] Guidelines: Add spaces in front and after the / operator.
[ticket/11301] Explicitly cast str offset to int to prevent E_NOTICE on 5.4.
[ticket/11311] Include asset core.js in subsilver2 overall_footer.html
[ticket/10949] Remove not needed comma
[ticket/11309] phpbb_extension_interface::disable_step correct docblock.
[ticket/10949] Converted missing code to new JS coding guidelines
[ticket/11302] Correctly select first timezone or selected timezone
[ticket/11305] Mock container for cache driver in functional create_user()
[ticket/11305] Check for $cache being null before using it in db drivers.
[ticket/10805] Compare phpbbAlertTimer against null
[ticket/11305] Define hook finder as a service on the container.
[ticket/11305] Adjust comment.
[ticket/11305] Use phpbb_create_default_container.
[ticket/11305] Create a normal container during final installation step.
[ticket/11305] Retrieve cache driver from container rather than cache service.
...
Conflicts:
phpBB/install/schemas/firebird_schema.sql
phpBB/install/schemas/mssql_schema.sql
phpBB/install/schemas/mysql_40_schema.sql
phpBB/install/schemas/mysql_41_schema.sql
phpBB/install/schemas/oracle_schema.sql
phpBB/install/schemas/postgres_schema.sql
phpBB/install/schemas/sqlite_schema.sql
phpBB/styles/subsilver2/template/overall_footer.html
Diffstat (limited to 'phpBB/includes/mcp/mcp_main.php')
-rw-r--r-- | phpBB/includes/mcp/mcp_main.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index 95ca7c2e1b..c28b466bcf 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -1080,6 +1080,7 @@ function mcp_fork_topic($topic_ids) } } + // Copy topic subscriptions to new topic $sql = 'SELECT user_id, notify_status FROM ' . TOPICS_WATCH_TABLE . ' WHERE topic_id = ' . $topic_id; @@ -1100,6 +1101,27 @@ function mcp_fork_topic($topic_ids) { $db->sql_multi_insert(TOPICS_WATCH_TABLE, $sql_ary); } + + // Copy bookmarks to new topic + $sql = 'SELECT user_id + FROM ' . BOOKMARKS_TABLE . ' + WHERE topic_id = ' . $topic_id; + $result = $db->sql_query($sql); + + $sql_ary = array(); + while ($row = $db->sql_fetchrow($result)) + { + $sql_ary[] = array( + 'topic_id' => (int) $new_topic_id, + 'user_id' => (int) $row['user_id'], + ); + } + $db->sql_freeresult($result); + + if (sizeof($sql_ary)) + { + $db->sql_multi_insert(BOOKMARKS_TABLE, $sql_ary); + } } // Sync new topics, parent forums and board stats |