aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_admin.php
diff options
context:
space:
mode:
authorjaviexin <javiexin@gmail.com>2015-07-09 20:02:39 +0200
committerjaviexin <javiexin@gmail.com>2015-07-09 20:02:39 +0200
commit054da801144c5e6f70a3c7fcd8244c38e2a1c619 (patch)
treedbbdb2dcb9cea44e67a5d0122946167786c557fe /phpBB/includes/functions_admin.php
parent558d604d83fd5ded2edc854a9944ad0d1188e2e5 (diff)
parentf576f42b4d3c607aee6b30154502adfed79301fb (diff)
downloadforums-054da801144c5e6f70a3c7fcd8244c38e2a1c619.tar
forums-054da801144c5e6f70a3c7fcd8244c38e2a1c619.tar.gz
forums-054da801144c5e6f70a3c7fcd8244c38e2a1c619.tar.bz2
forums-054da801144c5e6f70a3c7fcd8244c38e2a1c619.tar.xz
forums-054da801144c5e6f70a3c7fcd8244c38e2a1c619.zip
Merge pull request #1 from phpbb/3.1.x
Bring version up to date 20150708
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r--phpBB/includes/functions_admin.php25
1 files changed, 23 insertions, 2 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 79f9db2f3f..afd3dce730 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
@@ -920,7 +941,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
}
$error = false;
- $search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
+ $search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user, $phpbb_dispatcher);
if ($error)
{