aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Senko <jakubsenko@gmail.com>2019-05-27 16:26:23 +0200
committerJakub Senko <jakubsenko@gmail.com>2019-05-27 16:26:23 +0200
commitd0ef8695e4103178fd6ef106fa09b06c51ed85c5 (patch)
treeaec1ac7c4f5d33c8fd6668243de61358c5bfbfec /phpBB/posting.php
parentMerge pull request #5598 from marc1706/ticket/16067 (diff)
downloadphpbb-d0ef8695e4103178fd6ef106fa09b06c51ed85c5.tar.gz
phpbb-d0ef8695e4103178fd6ef106fa09b06c51ed85c5.tar.bz2
phpbb-d0ef8695e4103178fd6ef106fa09b06c51ed85c5.zip
[ticket/15946] Add core.posting_modify_row_data
PHPBB3-15946
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 75085a5635..003d3af5c2 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -222,6 +222,25 @@ if (!$post_data)
trigger_error(($mode == 'post' || $mode == 'bump' || $mode == 'reply') ? 'NO_TOPIC' : 'NO_POST');
}
+/**
+* This event allows you to bypass reply/quote test of an unapproved post.
+*
+* @event core.posting_modify_row_data
+* @var array post_data All post data from database
+* @var string mode What action to take if the form has been submitted
+* post|reply|quote|edit|delete|bump|smilies|popup
+* @var int topic_id ID of the topic
+* @var int forum_id ID of the forum
+* @since 3.2.8-RC1
+*/
+$vars = array(
+ 'post_data',
+ 'mode',
+ 'topic_id',
+ 'forum_id',
+);
+extract($phpbb_dispatcher->trigger_event('core.posting_modify_row_data', compact($vars)));
+
// Not able to reply to unapproved posts/topics
// TODO: add more descriptive language key
if ($auth->acl_get('m_approve', $forum_id) && ((($mode == 'reply' || $mode == 'bump') && $post_data['topic_visibility'] != ITEM_APPROVED) || ($mode == 'quote' && $post_data['post_visibility'] != ITEM_APPROVED)))