aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2013-12-08 11:47:07 -0800
committerNathan Guse <nathaniel.guse@gmail.com>2013-12-08 11:47:07 -0800
commit44a0e91ab95d1e8584ac75c9bb3d8fe9ff7f59de (patch)
treeb47875e94fa42c418a562425b16d17806c5bfe34 /phpBB
parent71169de8230812f2d05b87bfba42331e04663b81 (diff)
parentfdac051956238ccd30a51641f4332a012eaf4a6e (diff)
downloadforums-44a0e91ab95d1e8584ac75c9bb3d8fe9ff7f59de.tar
forums-44a0e91ab95d1e8584ac75c9bb3d8fe9ff7f59de.tar.gz
forums-44a0e91ab95d1e8584ac75c9bb3d8fe9ff7f59de.tar.bz2
forums-44a0e91ab95d1e8584ac75c9bb3d8fe9ff7f59de.tar.xz
forums-44a0e91ab95d1e8584ac75c9bb3d8fe9ff7f59de.zip
Merge pull request #1925 from imkingdavid/ticket/12069
[ticket/12069] Add core.submit_post_end event
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions_posting.php17
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;
}