diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2012-08-08 13:20:34 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2012-08-08 13:22:21 +0200 |
commit | cdcadf72c4d613e262a06589e7dfe4c81803344c (patch) | |
tree | f717c67f5e045cc374a7bbf9aa96a5dc7ce3ed08 | |
parent | 43d17b2337eefa0530dea57516138eaf9724862b (diff) | |
download | forums-cdcadf72c4d613e262a06589e7dfe4c81803344c.tar forums-cdcadf72c4d613e262a06589e7dfe4c81803344c.tar.gz forums-cdcadf72c4d613e262a06589e7dfe4c81803344c.tar.bz2 forums-cdcadf72c4d613e262a06589e7dfe4c81803344c.tar.xz forums-cdcadf72c4d613e262a06589e7dfe4c81803344c.zip |
[feature/php-events] Add event core.acp_manage_forums_move_content
PHPBB3-9550
-rw-r--r-- | phpBB/includes/acp/acp_forums.php | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index d6d8879f7b..6fb246458c 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -1464,7 +1464,30 @@ class acp_forums */ function move_forum_content($from_id, $to_id, $sync = true) { - global $db; + global $db, $phpbb_dispatcher; + + $errors = array(); + + /** + * Event when we move content from one forum to another + * + * @event core.acp_manage_forums_move_children + * @var int from_id If of the current parent forum + * @var int to_id If of the new parent forum + * @var bool sync Shall we sync the "to"-forum's data + * @var array errors Array of errors, should be strings and not + * language key. If this array is not empty, + * The content will not be moved. + * @since 3.1-A1 + */ + $vars = array('from_id', 'to_id', 'sync', 'errors'); + extract($phpbb_dispatcher->trigger_event('core.acp_manage_forums_move_content', compact($vars))); + + // Return if there were errors + if (!empty($errors)) + { + return $errors; + } $table_ary = array(LOG_TABLE, POSTS_TABLE, TOPICS_TABLE, DRAFTS_TABLE, TOPICS_TRACK_TABLE); |