mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/11103] Make $phpbb_notifications a global and use it everywhere
Do not use phpbb_container everywhere (makes testing difficult) PHPBB3-11103
This commit is contained in:
@@ -1409,7 +1409,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
|
||||
function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $update_message = true, $update_search_index = true)
|
||||
{
|
||||
global $db, $auth, $user, $config, $phpEx, $template, $phpbb_root_path;
|
||||
global $phpbb_container;
|
||||
global $phpbb_notifications;
|
||||
|
||||
// We do not handle erasing posts here
|
||||
if ($mode == 'delete')
|
||||
@@ -2220,7 +2220,6 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
}
|
||||
|
||||
// Send Notifications
|
||||
$phpbb_notifications = $phpbb_container->get('notifications');
|
||||
$notification_data = array_merge($data, array(
|
||||
'topic_title' => (isset($data['topic_title'])) ? $data['topic_title'] : $subject,
|
||||
'post_username' => $username,
|
||||
@@ -2229,6 +2228,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
'post_time' => $current_time,
|
||||
'post_subject' => $subject,
|
||||
));
|
||||
|
||||
if ($post_approval)
|
||||
{
|
||||
switch ($mode)
|
||||
|
Reference in New Issue
Block a user