1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-09 07:58:56 +02:00

Merge pull request from senky/ticket/15946

[ticket/15946] Add core.posting_modify_row_data
This commit is contained in:
Marc Alexander 2019-07-22 21:40:02 +02:00
commit 7c559b2912
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

@ -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)))