aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php31
1 files changed, 30 insertions, 1 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index af44f6270e..199a564210 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -27,8 +27,9 @@ function generate_smilies($mode, $forum_id)
global $db, $user, $config, $template, $phpbb_dispatcher;
global $phpEx, $phpbb_root_path, $phpbb_container, $phpbb_path_helper;
- $base_url = append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&f=' . $forum_id);
+ /* @var $pagination \phpbb\pagination */
$pagination = $phpbb_container->get('pagination');
+ $base_url = append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=smilies&f=' . $forum_id);
$start = request_var('start', 0);
if ($mode == 'window')
@@ -1039,6 +1040,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
global $user, $auth, $db, $template, $bbcode, $cache;
global $config, $phpbb_root_path, $phpEx, $phpbb_container;
+ /* @var $phpbb_content_visibility \phpbb\content_visibility */
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
$sql_sort = ($mode == 'post_review') ? 'ASC' : 'DESC';
@@ -1276,6 +1278,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data, $is_soft = false, $
$db->sql_freeresult($result);
}
+ /* @var $phpbb_content_visibility \phpbb\content_visibility */
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
// (Soft) delete the post
@@ -1825,6 +1828,30 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
break;
}
+ /**
+ * Modify sql query data for post submitting
+ *
+ * @event core.submit_post_modify_sql_data
+ * @var array data Array with the data for the post
+ * @var array poll Array with the poll data for the post
+ * @var string post_mode Variable containing posting mode value
+ * @var bool sql_data Array with the data for the posting SQL query
+ * @var string subject Variable containing post subject value
+ * @var int topic_type Variable containing topic type value
+ * @var string username Variable containing post author name
+ * @since 3.1.3-RC1
+ */
+ $vars = array(
+ 'data',
+ 'poll',
+ 'post_mode',
+ 'sql_data',
+ 'subject',
+ 'topic_type',
+ 'username',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.submit_post_modify_sql_data', compact($vars)));
+
// Submit new topic
if ($post_mode == 'post')
{
@@ -2070,6 +2097,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
$is_starter = ($post_mode == 'edit_first_post' || $post_mode == 'edit_topic' || $data['post_visibility'] != ITEM_APPROVED);
$is_latest = ($post_mode == 'edit_last_post' || $post_mode == 'edit_topic' || $data['post_visibility'] != ITEM_APPROVED);
+ /* @var $phpbb_content_visibility \phpbb\content_visibility */
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
$phpbb_content_visibility->set_post_visibility($post_visibility, $data['post_id'], $data['topic_id'], $data['forum_id'], $user->data['user_id'], time(), '', $is_starter, $is_latest);
}
@@ -2248,6 +2276,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
'post_subject' => $subject,
));
+ /* @var $phpbb_notifications \phpbb\notification\manager */
$phpbb_notifications = $phpbb_container->get('notification_manager');
if ($post_visibility == ITEM_APPROVED)