aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2014-02-20 00:47:26 +0800
committerrxu <rxu@mail.ru>2014-02-20 00:47:26 +0800
commit01bf27f78901aa50fb0a3d59b3e877b38829f3e8 (patch)
treeb325ee4f6df576425e4ed6a07a2edbc174ee2aab /phpBB/includes
parent06581ba9276310d6f845c84d16fd6c47d66544bf (diff)
downloadforums-01bf27f78901aa50fb0a3d59b3e877b38829f3e8.tar
forums-01bf27f78901aa50fb0a3d59b3e877b38829f3e8.tar.gz
forums-01bf27f78901aa50fb0a3d59b3e877b38829f3e8.tar.bz2
forums-01bf27f78901aa50fb0a3d59b3e877b38829f3e8.tar.xz
forums-01bf27f78901aa50fb0a3d59b3e877b38829f3e8.zip
[ticket/12190] Add core event "core.modify_submit_post_data"
Add core event - core.modify_submit_post_data to submit_post() function. This allows extensions to modify the whole post data before the post submitting, or even provide its own post submit procedure. PHPBB3-12190
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_posting.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index e14e9e27be..586883224e 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1476,6 +1476,22 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
{
global $db, $auth, $user, $config, $phpEx, $template, $phpbb_root_path, $phpbb_container, $phpbb_dispatcher;
+ /**
+ * Modify the data for post submitting
+ *
+ * @event core.modify_submit_post_data
+ * @var string mode Variable containing posting mode value
+ * @var string subject Variable containing post subject value
+ * @var string username Variable containing post author name
+ * @var int topic_type Variable containing topic type value
+ * @var array poll Array with the poll data for the post
+ * @var array data Array with the data for the post
+ * @var bool update_message Flag indicating if the post will be updated
+ * @var bool update_search_index Flag indicating if the search index will be updated
+ * @since 3.1.0-a4
+ */
+ extract($phpbb_dispatcher->trigger_event('core.modify_submit_post_data', compact(array('mode', 'subject', 'username', 'topic_type', 'poll', 'data', 'update_message', 'update_search_index'))));
+
// We do not handle erasing posts here
if ($mode == 'delete')
{