diff options
author | David King <imkingdavid@gmail.com> | 2013-12-08 14:42:46 -0500 |
---|---|---|
committer | David King <imkingdavid@gmail.com> | 2013-12-08 14:42:46 -0500 |
commit | fdac051956238ccd30a51641f4332a012eaf4a6e (patch) | |
tree | 458f69b3d8077625ce63733b841347fc7b6e607d /phpBB/includes | |
parent | 125e76f9aa83141534387a965e8373c9b9cd5c4d (diff) | |
download | forums-fdac051956238ccd30a51641f4332a012eaf4a6e.tar forums-fdac051956238ccd30a51641f4332a012eaf4a6e.tar.gz forums-fdac051956238ccd30a51641f4332a012eaf4a6e.tar.bz2 forums-fdac051956238ccd30a51641f4332a012eaf4a6e.tar.xz forums-fdac051956238ccd30a51641f4332a012eaf4a6e.zip |
[ticket/12069] Add core.submit_post_end event
PHPBB3-12069
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions_posting.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 1bcef7f1f2..e71b44a45b 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -2305,6 +2305,23 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u $url = (!$params) ? "{$phpbb_root_path}viewforum.$phpEx" : "{$phpbb_root_path}viewtopic.$phpEx"; $url = append_sid($url, 'f=' . $data['forum_id'] . $params) . $add_anchor; + /** + * This event is used for performing actions directly after a post or topic + * has been submitted. When a new topic is posted, the topic ID is + * available in the $data array. + * + * The only action that can be done by altering data made available to this + * event is to modify the return URL ($urL). + * + * @event core.submit_post_end + * @var string url The "Return to topic" URL + * @var array data Array of post data about the + * submitted post + * @since 3.1-A2 + */ + $vars = array('url', 'data'); + extract($phpbb_dispatcher->trigger_event('core.submit_post_end', compact($vars))); + return $url; } |