aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_admin.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2015-06-04 18:03:35 +0200
committerJoas Schilling <nickvergessen@gmx.de>2015-06-04 18:03:35 +0200
commit3ce3183e61adc1115964f655b5d685590e92567d (patch)
tree39292fc113c409a76881aee26f531fc35754e15c /phpBB/includes/functions_admin.php
parenta2643f8e674f8fb77a87bd0975bb46c8ba866d92 (diff)
parent7a55bcc0f3fc5a703b686affec413e891f558ff9 (diff)
downloadforums-3ce3183e61adc1115964f655b5d685590e92567d.tar
forums-3ce3183e61adc1115964f655b5d685590e92567d.tar.gz
forums-3ce3183e61adc1115964f655b5d685590e92567d.tar.bz2
forums-3ce3183e61adc1115964f655b5d685590e92567d.tar.xz
forums-3ce3183e61adc1115964f655b5d685590e92567d.zip
Merge branch '3.1.x'
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r--phpBB/includes/functions_admin.php23
1 files changed, 22 insertions, 1 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index fce4bf841b..42d18d7d41 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -500,7 +500,7 @@ function filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png')
*/
function move_topics($topic_ids, $forum_id, $auto_sync = true)
{
- global $db;
+ global $db, $phpbb_dispatcher;
if (empty($topic_ids))
{
@@ -534,6 +534,27 @@ function move_topics($topic_ids, $forum_id, $auto_sync = true)
}
$table_ary = array(TOPICS_TABLE, POSTS_TABLE, LOG_TABLE, DRAFTS_TABLE, TOPICS_TRACK_TABLE);
+
+ /**
+ * Perform additional actions before topics move
+ *
+ * @event core.move_topics_before_query
+ * @var array table_ary Array of tables from which forum_id will be updated for all rows that hold the moved topics
+ * @var array topic_ids Array of the moved topic ids
+ * @var string forum_id The forum id from where the topics are moved
+ * @var array forum_ids Array of the forums where the topics are moving (includes also forum_id)
+ * @var bool auto_sync Whether or not to perform auto sync
+ * @since 3.1.5-RC1
+ */
+ $vars = array(
+ 'table_ary',
+ 'topic_ids',
+ 'forum_id',
+ 'forum_ids',
+ 'auto_sync',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.move_topics_before_query', compact($vars)));
+
foreach ($table_ary as $table)
{
$sql = "UPDATE $table