aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2019-07-22 21:40:02 +0200
committerMarc Alexander <admin@m-a-styles.de>2019-07-22 21:40:02 +0200
commit7c559b2912d645291ec1045d589a6bf5e44f6dd0 (patch)
tree9d871e8b76dd957b929e1bb8989e30dc842556bb
parentd738397e6f6ecb7be1a81c11e69568d6854f78e9 (diff)
parentd0ef8695e4103178fd6ef106fa09b06c51ed85c5 (diff)
downloadforums-7c559b2912d645291ec1045d589a6bf5e44f6dd0.tar
forums-7c559b2912d645291ec1045d589a6bf5e44f6dd0.tar.gz
forums-7c559b2912d645291ec1045d589a6bf5e44f6dd0.tar.bz2
forums-7c559b2912d645291ec1045d589a6bf5e44f6dd0.tar.xz
forums-7c559b2912d645291ec1045d589a6bf5e44f6dd0.zip
Merge pull request #5609 from senky/ticket/15946
[ticket/15946] Add core.posting_modify_row_data
-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)))