mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 00:37:42 +02:00
[ticket/13450] Type-hint return value of $phpbb_container->get()
PHPBB3-13450
This commit is contained in:
@@ -77,6 +77,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
||||
break;
|
||||
}
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
||||
$selected_ids = '';
|
||||
@@ -157,6 +158,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
||||
$read_tracking_join = $read_tracking_select = '';
|
||||
}
|
||||
|
||||
/* @var $phpbb_content_visibility \phpbb\content_visibility */
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
|
||||
$sql = 'SELECT t.topic_id
|
||||
|
@@ -65,6 +65,7 @@ class mcp_logs
|
||||
$this->tpl_name = 'mcp_logs';
|
||||
$this->page_title = 'MCP_LOGS';
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
||||
$forum_list = array_values(array_intersect(get_forum_list('f_read'), get_forum_list('m_')));
|
||||
|
@@ -703,6 +703,7 @@ function mcp_restore_topic($topic_ids)
|
||||
|
||||
$data = phpbb_get_topic_data($topic_ids);
|
||||
|
||||
/* @var $phpbb_content_visibility \phpbb\content_visibility */
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
foreach ($data as $topic_id => $row)
|
||||
{
|
||||
@@ -788,6 +789,7 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
|
||||
// Only soft delete non-shadow topics
|
||||
if ($is_soft)
|
||||
{
|
||||
/* @var $phpbb_content_visibility \phpbb\content_visibility */
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
$return = $phpbb_content_visibility->set_topic_visibility(ITEM_DELETED, $topic_id, $row['forum_id'], $user->data['user_id'], time(), $soft_delete_reason);
|
||||
if (!empty($return))
|
||||
@@ -948,6 +950,7 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
|
||||
);
|
||||
}
|
||||
|
||||
/* @var $phpbb_content_visibility \phpbb\content_visibility */
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
foreach ($topic_info as $topic_id => $topic_data)
|
||||
{
|
||||
|
@@ -83,6 +83,8 @@ class mcp_notes
|
||||
$st = request_var('st', 0);
|
||||
$sk = request_var('sk', 'b');
|
||||
$sd = request_var('sd', 'd');
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
||||
add_form_key('mcp_notes');
|
||||
|
@@ -41,8 +41,9 @@ class mcp_pm_reports
|
||||
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||
include_once($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
|
||||
|
||||
$start = request_var('start', 0);
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
$start = request_var('start', 0);
|
||||
|
||||
$this->page_title = 'MCP_PM_REPORTS';
|
||||
|
||||
@@ -93,6 +94,7 @@ class mcp_pm_reports
|
||||
trigger_error('NO_REPORT');
|
||||
}
|
||||
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
$phpbb_notifications->mark_notifications_read_by_parent('notification.type.report_pm', $report_id, $user->data['user_id']);
|
||||
|
@@ -156,6 +156,7 @@ class mcp_queue
|
||||
$post_id = request_var('p', 0);
|
||||
$topic_id = request_var('t', 0);
|
||||
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
if ($topic_id)
|
||||
@@ -340,6 +341,8 @@ class mcp_queue
|
||||
|
||||
$topic_id = $request->variable('t', 0);
|
||||
$forum_info = array();
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
||||
if ($topic_id)
|
||||
@@ -679,6 +682,7 @@ class mcp_queue
|
||||
);
|
||||
}
|
||||
|
||||
/* @var $phpbb_content_visibility \phpbb\content_visibility */
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
foreach ($topic_info as $topic_id => $topic_data)
|
||||
{
|
||||
@@ -693,6 +697,7 @@ class mcp_queue
|
||||
// Only send out the mails, when the posts are being approved
|
||||
if ($action == 'approve')
|
||||
{
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
// Handle notifications
|
||||
@@ -866,6 +871,7 @@ class mcp_queue
|
||||
{
|
||||
$notify_poster = ($action == 'approve' && isset($_REQUEST['notify_poster'])) ? true : false;
|
||||
|
||||
/* @var $phpbb_content_visibility \phpbb\content_visibility */
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
$first_post_ids = array();
|
||||
|
||||
@@ -909,6 +915,7 @@ class mcp_queue
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Handle notifications
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
foreach ($topic_info as $topic_id => $topic_data)
|
||||
@@ -1168,6 +1175,7 @@ class mcp_queue
|
||||
}
|
||||
}
|
||||
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
$lang_reasons = array();
|
||||
|
@@ -90,6 +90,7 @@ class mcp_reports
|
||||
trigger_error('NO_REPORT');
|
||||
}
|
||||
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
$phpbb_notifications->mark_notifications_read('notification.type.report_post', $post_id, $user->data['user_id']);
|
||||
@@ -323,9 +324,10 @@ class mcp_reports
|
||||
$forum_list = array($forum_id);
|
||||
}
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
$forum_list[] = 0;
|
||||
$forum_data = array();
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
||||
$forum_options = '<option value="0"' . (($forum_id == 0) ? ' selected="selected"' : '') . '>' . $user->lang['ALL_FORUMS'] . '</option>';
|
||||
foreach ($forum_list_reports as $row)
|
||||
@@ -645,6 +647,7 @@ function close_report($report_id_list, $mode, $action, $pm = false)
|
||||
}
|
||||
unset($close_report_posts, $close_report_topics);
|
||||
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
foreach ($reports as $report)
|
||||
|
@@ -29,8 +29,9 @@ function mcp_topic_view($id, $mode, $action)
|
||||
|
||||
$url = append_sid("{$phpbb_root_path}mcp.$phpEx?" . phpbb_extra_url());
|
||||
|
||||
$user->add_lang('viewtopic');
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
$user->add_lang('viewtopic');
|
||||
|
||||
$topic_id = request_var('t', 0);
|
||||
$topic_info = phpbb_get_topic_data(array($topic_id), false, true);
|
||||
@@ -116,8 +117,9 @@ function mcp_topic_view($id, $mode, $action)
|
||||
$sort_by_sql = $sort_order_sql = array();
|
||||
phpbb_mcp_sorting('viewtopic', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $topic_info['forum_id'], $topic_id, $where_sql);
|
||||
|
||||
$limit_time_sql = ($sort_days) ? 'AND p.post_time >= ' . (time() - ($sort_days * 86400)) : '';
|
||||
/* @var $phpbb_content_visibility \phpbb\content_visibility */
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
$limit_time_sql = ($sort_days) ? 'AND p.post_time >= ' . (time() - ($sort_days * 86400)) : '';
|
||||
|
||||
if ($total == -1)
|
||||
{
|
||||
|
@@ -134,8 +134,9 @@ class mcp_warn
|
||||
global $phpEx, $phpbb_root_path, $config, $phpbb_container;
|
||||
global $template, $db, $user, $auth;
|
||||
|
||||
$user->add_lang('memberlist');
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
$user->add_lang('memberlist');
|
||||
|
||||
$start = request_var('start', 0);
|
||||
$st = request_var('st', 0);
|
||||
|
Reference in New Issue
Block a user