File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9999 // Check required permissions
100100 $ acl_check_ary = array ('f_list ' => 'POST_NOT_EXIST ' , 'f_read ' => 'USER_CANNOT_READ ' , 'f_report ' => 'USER_CANNOT_REPORT ' );
101101
102+ /**
103+ * This event allows you to do extra auth checks and verify if the user
104+ * has the required permissions
105+ *
106+ * @event core.report_post_auth
107+ * @var array forum_data All data available from the forums table on this post's forum
108+ * @var array report_data All data available from the topics and the posts tables on this post (and its topic)
109+ * @var array acl_check_ary An array with the ACL to be tested. The evaluation is made in the same order as the array is sorted
110+ * The key is the ACL name and the value is the language key for the error message.
111+ * @since 3.1.3-RC1
112+ */
113+ $ vars = array (
114+ 'forum_data ' ,
115+ 'report_data ' ,
116+ 'acl_check_ary ' ,
117+ );
118+ extract ($ phpbb_dispatcher ->trigger_event ('core.report_post_auth ' , compact ($ vars )));
119+
102120 foreach ($ acl_check_ary as $ acl => $ error )
103121 {
104122 if (!$ auth ->acl_get ($ acl , $ forum_id ))
You can’t perform that action at this time.
0 commit comments