mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-06 14:35:56 +02:00
[ticket/13450] Type-hint return value of $phpbb_container->get()
PHPBB3-13450
This commit is contained in:
parent
ef1be6e247
commit
b5544b2f47
@ -27,7 +27,10 @@ $user->session_begin();
|
||||
$auth->acl($user->data);
|
||||
$user->setup('app');
|
||||
|
||||
/* @var $http_kernel \Symfony\Component\HttpKernel\HttpKernel */
|
||||
$http_kernel = $phpbb_container->get('http_kernel');
|
||||
|
||||
/* @var $symfony_request \phpbb\symfony_request */
|
||||
$symfony_request = $phpbb_container->get('symfony_request');
|
||||
$response = $http_kernel->handle($symfony_request);
|
||||
$response->send();
|
||||
|
@ -64,6 +64,7 @@ $phpbb_container = $phpbb_container_builder->get_container();
|
||||
$phpbb_container->get('request')->enable_super_globals();
|
||||
require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx);
|
||||
|
||||
/* @var $user \phpbb\user */
|
||||
$user = $phpbb_container->get('user');
|
||||
$user->add_lang('acp/common');
|
||||
$user->add_lang('cli');
|
||||
|
@ -120,6 +120,8 @@ require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx);
|
||||
// Add own hook handler
|
||||
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
|
||||
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
|
||||
|
||||
/* @var $phpbb_hook_finder \phpbb\hook\finder */
|
||||
$phpbb_hook_finder = $phpbb_container->get('hook_finder');
|
||||
|
||||
foreach ($phpbb_hook_finder->find() as $hook)
|
||||
|
@ -47,9 +47,11 @@ $cron_type = request_var('cron_type', '');
|
||||
// Comment this line out for debugging so the page does not return an image.
|
||||
output_image();
|
||||
|
||||
/* @var $cron_lock \phpbb\lock\db */
|
||||
$cron_lock = $phpbb_container->get('cron.lock_db');
|
||||
if ($cron_lock->acquire())
|
||||
{
|
||||
/* @var $cron \phpbb\cron\manager */
|
||||
$cron = $phpbb_container->get('cron.manager');
|
||||
|
||||
$task = $cron->find_task($cron_type);
|
||||
|
@ -71,27 +71,38 @@ if (isset($_GET['avatar']))
|
||||
$phpbb_class_loader_ext->set_cache($phpbb_container->get('cache.driver'));
|
||||
|
||||
// set up caching
|
||||
/* @var $cache \phpbb\cache\service */
|
||||
$cache = $phpbb_container->get('cache');
|
||||
|
||||
/* @var $phpbb_dispatcher \phpbb\event\dispatcher */
|
||||
$phpbb_dispatcher = $phpbb_container->get('dispatcher');
|
||||
|
||||
/* @var $request \phpbb\request\request_interface */
|
||||
$request = $phpbb_container->get('request');
|
||||
|
||||
/* @var $db \phpbb\db\driver\driver_interface */
|
||||
$db = $phpbb_container->get('dbal.conn');
|
||||
|
||||
/* @var $phpbb_log \phpbb\log\log_interface */
|
||||
$phpbb_log = $phpbb_container->get('log');
|
||||
|
||||
unset($dbpasswd);
|
||||
|
||||
request_var('', 0, false, false, $request);
|
||||
|
||||
/* @var $config \phpbb\config\config */
|
||||
$config = $phpbb_container->get('config');
|
||||
set_config(null, null, null, $config);
|
||||
set_config_count(null, null, null, $config);
|
||||
|
||||
// load extensions
|
||||
/* @var $phpbb_extension_manager \phpbb\extension\manager */
|
||||
$phpbb_extension_manager = $phpbb_container->get('ext.manager');
|
||||
|
||||
// worst-case default
|
||||
$browser = strtolower($request->header('User-Agent', 'msie 6.0'));
|
||||
|
||||
/* @var $phpbb_avatar_manager \phpbb\avatar\manager */
|
||||
$phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
|
||||
|
||||
$filename = request_var('avatar', '');
|
||||
|
@ -65,10 +65,12 @@ if ($forum_id || $topic_id || $mode)
|
||||
}
|
||||
|
||||
// This boards URL
|
||||
/* @var $phpbb_feed_helper \phpbb\feed\helper */
|
||||
$phpbb_feed_helper = $phpbb_container->get('feed.helper');
|
||||
$board_url = $phpbb_feed_helper->get_board_url();
|
||||
|
||||
// Get correct feed object
|
||||
/* @var $phpbb_feed_factory \phpbb\feed\factory */
|
||||
$phpbb_feed_factory = $phpbb_container->get('feed.factory');
|
||||
$feed = $phpbb_feed_factory->get_feed($mode, $forum_id, $topic_id);
|
||||
|
||||
|
@ -1147,6 +1147,7 @@ class acp_attachments
|
||||
$total_size = $stats['upload_dir_size'];
|
||||
|
||||
// Make sure $start is set to the last page if it exceeds the amount
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
$start = $pagination->validate_start($start, $attachments_per_page, $num_files);
|
||||
|
||||
@ -1346,6 +1347,8 @@ class acp_attachments
|
||||
else
|
||||
{
|
||||
$this->set_attachment_stats($this->get_attachment_stats());
|
||||
|
||||
/* @var $log \phpbb\log\log_interface */
|
||||
$log = $this->phpbb_container->get('log');
|
||||
$log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_RESYNC_FILES_STATS');
|
||||
}
|
||||
|
@ -115,6 +115,7 @@ class acp_board
|
||||
break;
|
||||
|
||||
case 'avatar':
|
||||
/* @var $phpbb_avatar_manager \phpbb\avatar\manager */
|
||||
$phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
|
||||
$avatar_drivers = $phpbb_avatar_manager->get_all_drivers();
|
||||
|
||||
@ -553,6 +554,7 @@ class acp_board
|
||||
if ($mode == 'auth')
|
||||
{
|
||||
// Retrieve a list of auth plugins and check their config values
|
||||
/* @var $auth_providers \phpbb\auth\provider_collection */
|
||||
$auth_providers = $phpbb_container->get('auth.provider_collection');
|
||||
|
||||
$updated_auth_settings = false;
|
||||
@ -720,8 +722,9 @@ class acp_board
|
||||
{
|
||||
global $phpbb_root_path, $phpEx, $phpbb_container;
|
||||
|
||||
$auth_plugins = array();
|
||||
/* @var $auth_providers \phpbb\auth\provider_collection */
|
||||
$auth_providers = $phpbb_container->get('auth.provider_collection');
|
||||
$auth_plugins = array();
|
||||
|
||||
foreach ($auth_providers as $key => $value)
|
||||
{
|
||||
|
@ -30,6 +30,7 @@ class acp_captcha
|
||||
|
||||
$user->add_lang('acp/board');
|
||||
|
||||
/* @var $factory \phpbb\captcha\factory */
|
||||
$factory = $phpbb_container->get('captcha.factory');
|
||||
$captchas = $factory->get_captcha_types();
|
||||
|
||||
|
@ -48,6 +48,7 @@ class acp_contact
|
||||
include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
|
||||
}
|
||||
|
||||
/* @var $config_text \phpbb\config\db_text */
|
||||
$config_text = $phpbb_container->get('config_text');
|
||||
|
||||
$contact_admin_data = $config_text->get_array(array(
|
||||
|
@ -1050,6 +1050,7 @@ class acp_forums
|
||||
else
|
||||
{
|
||||
// Instantiate passwords manager
|
||||
/* @var $passwords_manager \phpbb\passwords\manager */
|
||||
$passwords_manager = $phpbb_container->get('passwords.manager');
|
||||
|
||||
$forum_data_sql['forum_password'] = $passwords_manager->hash($forum_data_sql['forum_password']);
|
||||
|
@ -320,6 +320,7 @@ class acp_groups
|
||||
|
||||
if ($config['allow_avatar'])
|
||||
{
|
||||
/* @var $phpbb_avatar_manager \phpbb\avatar\manager */
|
||||
$phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
|
||||
$avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();
|
||||
|
||||
@ -801,8 +802,9 @@ class acp_groups
|
||||
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$this->page_title = 'GROUP_MEMBERS';
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
$this->page_title = 'GROUP_MEMBERS';
|
||||
|
||||
// Grab the leaders - always, on every page...
|
||||
$sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_regdate, u.user_colour, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
|
||||
@ -989,7 +991,7 @@ class acp_groups
|
||||
}
|
||||
else if ($field && in_array($field, array('legend', 'teampage')))
|
||||
{
|
||||
|
||||
/* @var $group_position \phpbb\groupposition\groupposition_interface */
|
||||
$group_position = $phpbb_container->get('groupposition.' . $field);
|
||||
}
|
||||
|
||||
|
@ -903,9 +903,10 @@ class acp_icons
|
||||
)
|
||||
);
|
||||
|
||||
$spacer = false;
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
$pagination_start = request_var('start', 0);
|
||||
$spacer = false;
|
||||
|
||||
$item_count = $this->item_count($table);
|
||||
|
||||
|
@ -50,6 +50,8 @@ class acp_inactive
|
||||
|
||||
$form_key = 'acp_inactive';
|
||||
add_form_key($form_key);
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
||||
// We build the sort key and per page settings here, because they may be needed later
|
||||
|
@ -47,6 +47,8 @@ class acp_logs
|
||||
|
||||
$this->tpl_name = 'acp_logs';
|
||||
$this->log_type = constant('LOG_' . strtoupper($mode));
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
||||
// Delete entries if requested and able
|
||||
@ -72,6 +74,7 @@ class acp_logs
|
||||
$conditions['keywords'] = $keywords;
|
||||
}
|
||||
|
||||
/* @var $phpbb_log \phpbb\log\log_interface */
|
||||
$phpbb_log = $phpbb_container->get('log');
|
||||
$phpbb_log->delete($mode, $conditions);
|
||||
}
|
||||
|
@ -429,6 +429,7 @@ class acp_main
|
||||
));
|
||||
}
|
||||
|
||||
/* @var $version_helper \phpbb\version_helper */
|
||||
$version_helper = $phpbb_container->get('version_helper');
|
||||
try
|
||||
{
|
||||
|
@ -299,6 +299,7 @@ class acp_permission_roles
|
||||
trigger_error($user->lang['NO_ROLE_SELECTED'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
/* @var $phpbb_permissions \phpbb\permissions */
|
||||
$phpbb_permissions = $phpbb_container->get('acl.permissions');
|
||||
|
||||
$template->assign_vars(array(
|
||||
@ -471,6 +472,7 @@ class acp_permission_roles
|
||||
{
|
||||
global $template, $user, $phpbb_container;
|
||||
|
||||
/* @var $phpbb_permissions \phpbb\permissions */
|
||||
$phpbb_permissions = $phpbb_container->get('acl.permissions');
|
||||
|
||||
$content_array = $categories = array();
|
||||
|
@ -23,6 +23,10 @@ class acp_permissions
|
||||
{
|
||||
var $u_action;
|
||||
var $permission_dropdown;
|
||||
|
||||
/**
|
||||
* @var $phpbb_permissions \phpbb\permissions
|
||||
*/
|
||||
protected $permissions;
|
||||
|
||||
function main($id, $mode)
|
||||
|
@ -25,6 +25,10 @@ class acp_profile
|
||||
|
||||
var $edit_lang_id;
|
||||
var $lang_defs;
|
||||
|
||||
/**
|
||||
* @var \phpbb\di\service_collection
|
||||
*/
|
||||
protected $type_collection;
|
||||
|
||||
function main($id, $mode)
|
||||
@ -51,6 +55,7 @@ class acp_profile
|
||||
trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
/* @var $cp \phpbb\profilefields\manager */
|
||||
$cp = $phpbb_container->get('profilefields.manager');
|
||||
$this->type_collection = $phpbb_container->get('profilefields.type_collection');
|
||||
|
||||
@ -112,6 +117,7 @@ class acp_profile
|
||||
$db->sql_query('DELETE FROM ' . PROFILE_FIELDS_LANG_TABLE . " WHERE field_id = $field_id");
|
||||
$db->sql_query('DELETE FROM ' . PROFILE_LANG_TABLE . " WHERE field_id = $field_id");
|
||||
|
||||
/* @var $db_tools \phpbb\db\tools */
|
||||
$db_tools = $phpbb_container->get('dbal.tools');
|
||||
$db_tools->sql_column_remove(PROFILE_FIELDS_DATA_TABLE, 'pf_' . $field_ident);
|
||||
|
||||
@ -881,6 +887,7 @@ class acp_profile
|
||||
{
|
||||
$field_ident = 'pf_' . $field_ident;
|
||||
|
||||
/* @var $db_tools \phpbb\db\tools */
|
||||
$db_tools = $phpbb_container->get('dbal.tools');
|
||||
$db_tools->sql_column_add(PROFILE_FIELDS_DATA_TABLE, $field_ident, array($profile_field->get_database_column_type(), null));
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ class acp_update
|
||||
$this->tpl_name = 'acp_update';
|
||||
$this->page_title = 'ACP_VERSION_CHECK';
|
||||
|
||||
/* @var $version_helper \phpbb\version_helper */
|
||||
$version_helper = $phpbb_container->get('version_helper');
|
||||
try
|
||||
{
|
||||
|
@ -418,6 +418,7 @@ class acp_users
|
||||
{
|
||||
if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
|
||||
{
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
$phpbb_notifications->delete_notifications('notification.type.admin_activate_user', $user_row['user_id']);
|
||||
|
||||
@ -481,6 +482,7 @@ class acp_users
|
||||
}
|
||||
|
||||
// Delete old avatar if present
|
||||
/* @var $phpbb_avatar_manager \phpbb\avatar\manager */
|
||||
$phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
|
||||
$phpbb_avatar_manager->handle_avatar_delete($db, $user, $phpbb_avatar_manager->clean_row($user_row, 'user'), USERS_TABLE, 'user_');
|
||||
|
||||
@ -831,6 +833,7 @@ class acp_users
|
||||
}
|
||||
|
||||
// Instantiate passwords manager
|
||||
/* @var $passwords_manager \phpbb\passwords\manager */
|
||||
$passwords_manager = $phpbb_container->get('passwords.manager');
|
||||
|
||||
// Which updates do we need to do?
|
||||
@ -1105,6 +1108,8 @@ class acp_users
|
||||
$deleteall = (isset($_POST['delall'])) ? true : false;
|
||||
$marked = request_var('mark', array(0));
|
||||
$message = utf8_normalize_nfc(request_var('message', '', true));
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
||||
// Sort keys
|
||||
@ -1347,6 +1352,7 @@ class acp_users
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
|
||||
/* @var $cp \phpbb\profilefields\manager */
|
||||
$cp = $phpbb_container->get('profilefields.manager');
|
||||
|
||||
$cp_data = $cp_error = array();
|
||||
@ -1741,6 +1747,7 @@ class acp_users
|
||||
|
||||
if ($config['allow_avatar'])
|
||||
{
|
||||
/* @var $phpbb_avatar_manager \phpbb\avatar\manager */
|
||||
$phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
|
||||
$avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();
|
||||
|
||||
@ -1986,11 +1993,12 @@ class acp_users
|
||||
break;
|
||||
|
||||
case 'attach':
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
||||
$start = request_var('start', 0);
|
||||
$deletemark = (isset($_POST['delmarked'])) ? true : false;
|
||||
$marked = request_var('mark', array(0));
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
||||
// Sort keys
|
||||
$sort_key = request_var('sk', 'a');
|
||||
|
@ -267,6 +267,8 @@ class auth_admin extends \phpbb\auth\auth
|
||||
function display_mask($mode, $permission_type, &$hold_ary, $user_mode = 'user', $local = false, $group_display = true)
|
||||
{
|
||||
global $template, $user, $db, $phpbb_root_path, $phpEx, $phpbb_container;
|
||||
|
||||
/* @var $phpbb_permissions \phpbb\permissions */
|
||||
$phpbb_permissions = $phpbb_container->get('acl.permissions');
|
||||
|
||||
// Define names for template loops, might be able to be set
|
||||
@ -1108,6 +1110,7 @@ class auth_admin extends \phpbb\auth\auth
|
||||
{
|
||||
global $template, $user, $phpbb_admin_path, $phpEx, $phpbb_container;
|
||||
|
||||
/* @var $phpbb_permissions \phpbb\permissions */
|
||||
$phpbb_permissions = $phpbb_container->get('acl.permissions');
|
||||
|
||||
@reset($category_array);
|
||||
@ -1186,6 +1189,7 @@ class auth_admin extends \phpbb\auth\auth
|
||||
{
|
||||
global $user, $phpbb_container;
|
||||
|
||||
/* @var $phpbb_permissions \phpbb\permissions */
|
||||
$phpbb_permissions = $phpbb_container->get('acl.permissions');
|
||||
|
||||
foreach ($key_sort_array as $forum_id)
|
||||
|
@ -19,29 +19,49 @@ if (!defined('IN_PHPBB'))
|
||||
}
|
||||
|
||||
// set up caching
|
||||
/* @var $cache \phpbb\cache\service */
|
||||
$cache = $phpbb_container->get('cache');
|
||||
|
||||
// Instantiate some basic classes
|
||||
/* @var $phpbb_dispatcher \phpbb\event\dispatcher */
|
||||
$phpbb_dispatcher = $phpbb_container->get('dispatcher');
|
||||
|
||||
/* @var $request \phpbb\request\request_interface */
|
||||
$request = $phpbb_container->get('request');
|
||||
|
||||
/* @var $user \phpbb\user */
|
||||
$user = $phpbb_container->get('user');
|
||||
|
||||
/* @var $auth \phpbb\auth\auth */
|
||||
$auth = $phpbb_container->get('auth');
|
||||
|
||||
/* @var $db \phpbb\db\driver\driver_interface */
|
||||
$db = $phpbb_container->get('dbal.conn');
|
||||
|
||||
// make sure request_var uses this request instance
|
||||
request_var('', 0, false, false, $request); // "dependency injection" for a function
|
||||
|
||||
// Grab global variables, re-cache if necessary
|
||||
/* @var $config phpbb\config\db */
|
||||
$config = $phpbb_container->get('config');
|
||||
set_config(null, null, null, $config);
|
||||
set_config_count(null, null, null, $config);
|
||||
|
||||
/* @var $phpbb_log \phpbb\log\log_interface */
|
||||
$phpbb_log = $phpbb_container->get('log');
|
||||
|
||||
/* @var $symfony_request \phpbb\symfony_request */
|
||||
$symfony_request = $phpbb_container->get('symfony_request');
|
||||
|
||||
/* @var $phpbb_filesystem \phpbb\filesystem */
|
||||
$phpbb_filesystem = $phpbb_container->get('filesystem');
|
||||
|
||||
/* @var $phpbb_path_helper \phpbb\path_helper */
|
||||
$phpbb_path_helper = $phpbb_container->get('path_helper');
|
||||
|
||||
// load extensions
|
||||
/* @var $phpbb_extension_manager \phpbb\extension\manager */
|
||||
$phpbb_extension_manager = $phpbb_container->get('ext.manager');
|
||||
|
||||
/* @var $template \phpbb\template\template */
|
||||
$template = $phpbb_container->get('template');
|
||||
|
@ -1159,7 +1159,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
|
||||
if ($forum_id === false || !sizeof($forum_id))
|
||||
{
|
||||
// Mark all forums read (index page)
|
||||
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
// Mark all topic notifications read for this user
|
||||
@ -1226,6 +1226,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
|
||||
$forum_id = array($forum_id);
|
||||
}
|
||||
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
$phpbb_notifications->mark_notifications_read_by_parent(array(
|
||||
@ -1348,6 +1349,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
|
||||
return;
|
||||
}
|
||||
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
// Mark post notifications read for this user in this topic
|
||||
@ -1799,6 +1801,7 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti
|
||||
|
||||
// Handle update of unapproved topics info.
|
||||
// Only update for moderators having m_approve permission for the forum.
|
||||
/* @var $phpbb_content_visibility \phpbb\content_visibility */
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
|
||||
// Check the forum for any left unread topics.
|
||||
@ -2954,6 +2957,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||
$s_hidden_fields['credential'] = $credential;
|
||||
}
|
||||
|
||||
/* @var $provider_collection \phpbb\auth\provider_collection */
|
||||
$provider_collection = $phpbb_container->get('auth.provider_collection');
|
||||
$auth_provider = $provider_collection->get_provider();
|
||||
|
||||
@ -3057,6 +3061,7 @@ function login_forum_box($forum_data)
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
/* @var $passwords_manager \phpbb\passwords\manager */
|
||||
$passwords_manager = $phpbb_container->get('passwords.manager');
|
||||
|
||||
if ($passwords_manager->check($password, $forum_data['forum_password']))
|
||||
@ -4746,6 +4751,7 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false)
|
||||
'height' => $row['avatar_height'],
|
||||
);
|
||||
|
||||
/* @var $phpbb_avatar_manager \phpbb\avatar\manager */
|
||||
$phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
|
||||
$driver = $phpbb_avatar_manager->get_driver($row['avatar_type'], $ignore_config);
|
||||
$html = '';
|
||||
@ -4931,6 +4937,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
|
||||
// This path is sent with the base template paths in the assign_vars()
|
||||
// call below. We need to correct it in case we are accessing from a
|
||||
// controller because the web paths will be incorrect otherwise.
|
||||
/* @var $phpbb_path_helper \phpbb\path_helper */
|
||||
$phpbb_path_helper = $phpbb_container->get('path_helper');
|
||||
$corrected_path = $phpbb_path_helper->get_web_root_path();
|
||||
$web_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? $board_url : $corrected_path;
|
||||
@ -4969,6 +4976,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
|
||||
$notifications = false;
|
||||
if ($config['load_notifications'] && $user->data['user_id'] != ANONYMOUS && $user->data['user_type'] != USER_IGNORE)
|
||||
{
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
$notifications = $phpbb_notifications->load_notifications(array(
|
||||
@ -5299,6 +5307,8 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler =
|
||||
if ($call_cron)
|
||||
{
|
||||
global $phpbb_container;
|
||||
|
||||
/* @var $cron \phpbb\cron\manager */
|
||||
$cron = $phpbb_container->get('cron.manager');
|
||||
$task = $cron->find_one_ready_task();
|
||||
|
||||
|
@ -715,6 +715,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
|
||||
set_config_count('num_topics', $approved_topics * (-1), true);
|
||||
}
|
||||
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
$phpbb_notifications->delete_notifications(array(
|
||||
@ -979,6 +980,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
||||
delete_topics('topic_id', $remove_topics, $auto_sync, $post_count_sync, false);
|
||||
}
|
||||
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
$phpbb_notifications->delete_notifications($delete_notifications_types, $post_ids);
|
||||
@ -3005,6 +3007,7 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port
|
||||
global $phpbb_container;
|
||||
|
||||
// Get file downloader and assign $errstr and $errno
|
||||
/* @var $file_downloader \phpbb\file_downloader */
|
||||
$file_downloader = $phpbb_container->get('file_downloader');
|
||||
|
||||
$file_data = $file_downloader->get($host, $directory, $filename, $port, $timeout);
|
||||
|
@ -59,6 +59,7 @@ function phpbb_hash($password)
|
||||
{
|
||||
global $phpbb_container;
|
||||
|
||||
/* @var $passwords_manager \phpbb\passwords\manager */
|
||||
$passwords_manager = $phpbb_container->get('passwords.manager');
|
||||
return $passwords_manager->hash($password);
|
||||
}
|
||||
@ -77,6 +78,7 @@ function phpbb_check_hash($password, $hash)
|
||||
{
|
||||
global $phpbb_container;
|
||||
|
||||
/* @var $passwords_manager \phpbb\passwords\manager */
|
||||
$passwords_manager = $phpbb_container->get('passwords.manager');
|
||||
return $passwords_manager->check($password, $hash);
|
||||
}
|
||||
@ -97,6 +99,7 @@ function phpbb_clean_path($path)
|
||||
|
||||
if (!$phpbb_path_helper && $phpbb_container)
|
||||
{
|
||||
/* @var $phpbb_path_helper \phpbb\path_helper */
|
||||
$phpbb_path_helper = $phpbb_container->get('path_helper');
|
||||
}
|
||||
else if (!$phpbb_path_helper)
|
||||
|
@ -153,6 +153,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
$forum_tracking_info = array();
|
||||
$branch_root_id = $root_data['forum_id'];
|
||||
|
||||
/* @var $phpbb_content_visibility \phpbb\content_visibility */
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
@ -1134,6 +1135,7 @@ function display_user_activity(&$userdata)
|
||||
$active_f_row = $active_t_row = array();
|
||||
if (!empty($forum_ary))
|
||||
{
|
||||
/* @var $phpbb_content_visibility \phpbb\content_visibility */
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
|
||||
// Obtain active forum
|
||||
|
@ -301,6 +301,7 @@ function phpbb_get_forum_data($forum_id, $acl_list = 'f_list', $read_tracking =
|
||||
WHERE " . $db->sql_in_set('f.forum_id', $forum_id);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
/* @var $phpbb_content_visibility \phpbb\content_visibility */
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
|
@ -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
|
||||
@ -2094,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);
|
||||
}
|
||||
@ -2272,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)
|
||||
|
@ -881,6 +881,7 @@ function update_unread_status($unread, $msg_id, $user_id, $folder_id)
|
||||
|
||||
global $db, $user, $phpbb_container;
|
||||
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
$phpbb_notifications->mark_notifications_read('notification.type.pm', $msg_id, $user_id);
|
||||
@ -1130,6 +1131,7 @@ function delete_pm($user_id, $msg_ids, $folder_id)
|
||||
$user->data['user_unread_privmsg'] -= $num_unread;
|
||||
}
|
||||
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
$phpbb_notifications->delete_notifications('notification.type.pm', array_keys($delete_rows));
|
||||
@ -1243,6 +1245,7 @@ function phpbb_delete_users_pms($user_ids)
|
||||
|
||||
$db->sql_transaction('begin');
|
||||
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
if (!empty($undelivered_msg))
|
||||
@ -1925,6 +1928,7 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
|
||||
'recipients' => $recipients,
|
||||
));
|
||||
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
if ($mode == 'edit')
|
||||
|
@ -281,6 +281,7 @@ function user_add($user_row, $cp_data = false, $notifications_data = null)
|
||||
{
|
||||
$cp_data['user_id'] = (int) $user_id;
|
||||
|
||||
/* @var $cp \phpbb\profilefields\manager */
|
||||
$cp = $phpbb_container->get('profilefields.manager');
|
||||
$sql = 'INSERT INTO ' . PROFILE_FIELDS_DATA_TABLE . ' ' .
|
||||
$db->sql_build_array('INSERT', $cp->build_insert_sql_array($cp_data));
|
||||
@ -366,6 +367,7 @@ function user_add($user_row, $cp_data = false, $notifications_data = null)
|
||||
// Subscribe user to notifications if necessary
|
||||
if (!empty($notifications_data))
|
||||
{
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
foreach ($notifications_data as $subscription)
|
||||
{
|
||||
@ -2249,8 +2251,12 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow
|
||||
$current_legend = \phpbb\groupposition\legend::GROUP_DISABLED;
|
||||
$current_teampage = \phpbb\groupposition\teampage::GROUP_DISABLED;
|
||||
|
||||
/* @var $legend \phpbb\groupposition\legend */
|
||||
$legend = $phpbb_container->get('groupposition.legend');
|
||||
|
||||
/* @var $teampage \phpbb\groupposition\teampage */
|
||||
$teampage = $phpbb_container->get('groupposition.teampage');
|
||||
|
||||
if ($group_id)
|
||||
{
|
||||
try
|
||||
@ -2564,6 +2570,7 @@ function group_delete($group_id, $group_name = false)
|
||||
// Delete group from legend and teampage
|
||||
try
|
||||
{
|
||||
/* @var $legend \phpbb\groupposition\legend */
|
||||
$legend = $phpbb_container->get('groupposition.legend');
|
||||
$legend->delete_group($group_id);
|
||||
unset($legend);
|
||||
@ -2577,6 +2584,7 @@ function group_delete($group_id, $group_name = false)
|
||||
|
||||
try
|
||||
{
|
||||
/* @var $teampage \phpbb\groupposition\teampage */
|
||||
$teampage = $phpbb_container->get('groupposition.teampage');
|
||||
$teampage->delete_group($group_id);
|
||||
unset($teampage);
|
||||
@ -2720,6 +2728,7 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false,
|
||||
|
||||
if ($pending)
|
||||
{
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
foreach ($add_id_ary as $user_id)
|
||||
@ -2879,6 +2888,7 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
|
||||
|
||||
group_update_listings($group_id);
|
||||
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
$phpbb_notifications->delete_notifications('notification.type.group_request', $user_id_ary, $group_id);
|
||||
@ -3043,6 +3053,7 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
|
||||
AND " . $db->sql_in_set('user_id', $user_id_ary);
|
||||
$db->sql_query($sql);
|
||||
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
$phpbb_notifications->add_notifications('notification.type.group_request_approved', array(
|
||||
|
@ -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);
|
||||
|
@ -110,6 +110,7 @@ class ucp_activate
|
||||
|
||||
if ($config['require_activation'] == USER_ACTIVATION_ADMIN && !$update_password)
|
||||
{
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
$phpbb_notifications->delete_notifications('notification.type.admin_activate_user', $user_row['user_id']);
|
||||
|
||||
|
@ -123,6 +123,7 @@ class ucp_attachments
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Ensure start is a valid value
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
$start = $pagination->validate_start($start, $config['topics_per_page'], $num_attachments);
|
||||
|
||||
|
@ -38,6 +38,7 @@ class ucp_auth_link
|
||||
|
||||
$error = array();
|
||||
|
||||
/* @var $provider_collection \phpbb\auth\provider_collection */
|
||||
$provider_collection = $phpbb_container->get('auth.provider_collection');
|
||||
$auth_provider = $provider_collection->get_provider();
|
||||
|
||||
|
@ -464,6 +464,7 @@ class ucp_groups
|
||||
|
||||
if ($config['allow_avatar'])
|
||||
{
|
||||
/* @var $phpbb_avatar_manager \phpbb\avatar\manager */
|
||||
$phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
|
||||
$avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();
|
||||
|
||||
@ -826,6 +827,7 @@ class ucp_groups
|
||||
$s_action_options .= '<option value="' . $option . '">' . $user->lang['GROUP_' . $lang] . '</option>';
|
||||
}
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
$base_url = $this->u_action . "&action=$action&g=$group_id";
|
||||
$start = $pagination->validate_start($start, $config['topics_per_page'], $total_members);
|
||||
|
@ -57,6 +57,7 @@ class ucp_login_link
|
||||
}
|
||||
|
||||
// Use the auth_provider requested even if different from configured
|
||||
/* @var $provider_collection \phpbb\auth\provider_collection */
|
||||
$provider_collection = $phpbb_container->get('auth.provider_collection');
|
||||
$auth_provider = $provider_collection->get_provider($request->variable('auth_provider', ''));
|
||||
|
||||
|
@ -645,9 +645,10 @@ class ucp_main
|
||||
{
|
||||
global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx, $phpbb_container;
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
$table = ($mode == 'subscribed') ? TOPICS_WATCH_TABLE : BOOKMARKS_TABLE;
|
||||
$start = request_var('start', 0);
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
||||
// Grab icons
|
||||
$icons = $cache->obtain_icons();
|
||||
@ -769,6 +770,7 @@ class ucp_main
|
||||
}
|
||||
}
|
||||
|
||||
/* @var $phpbb_content_visibility \phpbb\content_visibility */
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
|
||||
foreach ($topic_list as $topic_id)
|
||||
|
@ -34,7 +34,10 @@ class ucp_notifications
|
||||
$form_time = $request->variable('form_time', 0);
|
||||
$form_time = ($form_time <= 0 || $form_time > time()) ? time() : $form_time;
|
||||
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
||||
switch ($mode)
|
||||
|
@ -458,8 +458,9 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
$icon_id = 0;
|
||||
}
|
||||
|
||||
$message_parser = new parse_message();
|
||||
/* @var $plupload \phpbb\plupload\plupload */
|
||||
$plupload = $phpbb_container->get('plupload');
|
||||
$message_parser = new parse_message();
|
||||
$message_parser->set_plupload($plupload);
|
||||
|
||||
$message_parser->message = ($action == 'reply') ? '' : $message_text;
|
||||
|
@ -406,6 +406,7 @@ function get_pm_from($folder_id, $folder, $user_id)
|
||||
$sort_key = request_var('sk', 't');
|
||||
$sort_dir = request_var('sd', 'd');
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
||||
// PM ordering options
|
||||
|
@ -65,6 +65,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||
// Load the custom profile fields
|
||||
if ($config['load_cpf_pm'])
|
||||
{
|
||||
/* @var $cp \phpbb\profilefields\manager */
|
||||
$cp = $phpbb_container->get('profilefields.manager');
|
||||
|
||||
$profile_fields = $cp->grab_profile_fields_data($author_id);
|
||||
|
@ -84,6 +84,7 @@ class ucp_profile
|
||||
}
|
||||
|
||||
// Instantiate passwords manager
|
||||
/* @var $passwords_manager \phpbb\passwords\manager */
|
||||
$passwords_manager = $phpbb_container->get('passwords.manager');
|
||||
|
||||
// Only check the new password against the previous password if there have been no errors
|
||||
@ -261,6 +262,7 @@ class ucp_profile
|
||||
trigger_error('NO_AUTH_PROFILEINFO');
|
||||
}
|
||||
|
||||
/* @var $cp \phpbb\profilefields\manager */
|
||||
$cp = $phpbb_container->get('profilefields.manager');
|
||||
|
||||
$cp_data = $cp_error = array();
|
||||
@ -520,6 +522,7 @@ class ucp_profile
|
||||
|
||||
if ($config['allow_avatar'] && $auth->acl_get('u_chgavatar'))
|
||||
{
|
||||
/* @var $phpbb_avatar_manager \phpbb\avatar\manager */
|
||||
$phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
|
||||
$avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();
|
||||
|
||||
|
@ -77,6 +77,7 @@ class ucp_register
|
||||
}
|
||||
}
|
||||
|
||||
/* @var $cp \phpbb\profilefields\manager */
|
||||
$cp = $phpbb_container->get('profilefields.manager');
|
||||
|
||||
$error = $cp_data = $cp_error = array();
|
||||
@ -88,6 +89,7 @@ class ucp_register
|
||||
if (!empty($login_link_data))
|
||||
{
|
||||
// Confirm that we have all necessary data
|
||||
/* @var $provider_collection \phpbb\auth\provider_collection */
|
||||
$provider_collection = $phpbb_container->get('auth.provider_collection');
|
||||
$auth_provider = $provider_collection->get_provider($request->variable('auth_provider', ''));
|
||||
|
||||
@ -298,6 +300,7 @@ class ucp_register
|
||||
}
|
||||
|
||||
// Instantiate passwords manager
|
||||
/* @var $passwords_manager \phpbb\passwords\manager */
|
||||
$passwords_manager = $phpbb_container->get('passwords.manager');
|
||||
|
||||
$user_row = array(
|
||||
@ -389,6 +392,7 @@ class ucp_register
|
||||
|
||||
if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
|
||||
{
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
$phpbb_notifications->add_notifications('notification.type.admin_activate_user', array(
|
||||
'user_id' => $user_id,
|
||||
|
@ -92,6 +92,7 @@ class ucp_remind
|
||||
$user_actkey = gen_rand_string(mt_rand(6, 10));
|
||||
|
||||
// Instantiate passwords manager
|
||||
/* @var $manager \phpbb\passwords\manager */
|
||||
$passwords_manager = $phpbb_container->get('passwords.manager');
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||
|
@ -42,6 +42,7 @@ if (($mark_notification = $request->variable('mark_notification', 0)))
|
||||
|
||||
if (check_link_hash($request->variable('hash', ''), 'mark_notification_read'))
|
||||
{
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
$notification = $phpbb_notifications->load_notifications(array(
|
||||
|
@ -1974,6 +1974,7 @@ function phpbb_convert_password_hash($hash)
|
||||
{
|
||||
global $phpbb_container;
|
||||
|
||||
/* @var $manager \phpbb\passwords\manager */
|
||||
$manager = $phpbb_container->get('passwords.manager');
|
||||
$hash = $manager->hash($hash, '$H$');
|
||||
|
||||
|
@ -87,20 +87,33 @@ $phpbb_container_builder->set_dump_container(false);
|
||||
$phpbb_container = $phpbb_container_builder->get_container();
|
||||
|
||||
// set up caching
|
||||
/* @var $cache \phpbb\cache\service */
|
||||
$cache = $phpbb_container->get('cache');
|
||||
|
||||
// Instantiate some basic classes
|
||||
/* @var $phpbb_dispatcher \phpbb\event\dispatcher */
|
||||
$phpbb_dispatcher = $phpbb_container->get('dispatcher');
|
||||
|
||||
/* @var $request \phpbb\request\request_interface */
|
||||
$request = $phpbb_container->get('request');
|
||||
|
||||
/* @var $user \phpbb\user */
|
||||
$user = $phpbb_container->get('user');
|
||||
|
||||
/* @var $auth \phpbb\auth\auth */
|
||||
$auth = $phpbb_container->get('auth');
|
||||
|
||||
/* @var $db \phpbb\db\driver\driver_interface */
|
||||
$db = $phpbb_container->get('dbal.conn');
|
||||
|
||||
/* @var $phpbb_log \phpbb\log\log_interface */
|
||||
$phpbb_log = $phpbb_container->get('log');
|
||||
|
||||
// make sure request_var uses this request instance
|
||||
request_var('', 0, false, false, $request); // "dependency injection" for a function
|
||||
|
||||
// Grab global variables, re-cache if necessary
|
||||
/* @var $config \phpbb\config\config */
|
||||
$config = $phpbb_container->get('config');
|
||||
set_config(null, null, null, $config);
|
||||
set_config_count(null, null, null, $config);
|
||||
@ -120,6 +133,7 @@ if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx))
|
||||
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
|
||||
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
|
||||
|
||||
/* @var $phpbb_hook_finder \phpbb\hook\finder */
|
||||
$phpbb_hook_finder = $phpbb_container->get('hook_finder');
|
||||
foreach ($phpbb_hook_finder->find() as $hook)
|
||||
{
|
||||
@ -172,11 +186,13 @@ define('IN_DB_UPDATE', true);
|
||||
|
||||
// End startup code
|
||||
|
||||
/* @var $migrator \phpbb\db\migrator */
|
||||
$migrator = $phpbb_container->get('migrator');
|
||||
$migrator->set_output_handler(new \phpbb\db\log_wrapper_migrator_output_handler($user, new \phpbb\db\html_migrator_output_handler($user), $phpbb_root_path . 'store/migrations_' . time() . '.log'));
|
||||
|
||||
$migrator->create_migrations_table();
|
||||
|
||||
/* @var $phpbb_extension_manager \phpbb\extension\manager */
|
||||
$phpbb_extension_manager = $phpbb_container->get('ext.manager');
|
||||
|
||||
$migrations = $phpbb_extension_manager
|
||||
|
@ -143,7 +143,10 @@ $phpbb_container->compile();
|
||||
$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
|
||||
$phpbb_class_loader_ext->set_cache($phpbb_container->get('cache.driver'));
|
||||
|
||||
/* @var $phpbb_dispatcher \phpbb\event\dispatcher */
|
||||
$phpbb_dispatcher = $phpbb_container->get('dispatcher');
|
||||
|
||||
/* @var $request \phpbb\request\request_interface */
|
||||
$request = $phpbb_container->get('request');
|
||||
|
||||
// make sure request_var uses this request instance
|
||||
@ -250,6 +253,7 @@ if (file_exists($phpbb_root_path . 'includes/hooks/index.' . $phpEx))
|
||||
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
|
||||
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
|
||||
|
||||
/* @var $phpbb_hook_finder \phpbb\hook\finder */
|
||||
$phpbb_hook_finder = $phpbb_container->get('hook_finder');
|
||||
foreach ($phpbb_hook_finder->find() as $hook)
|
||||
{
|
||||
@ -266,8 +270,13 @@ $config = new \phpbb\config\config(array(
|
||||
'load_tplcompile' => '1'
|
||||
));
|
||||
|
||||
/* @var $symfony_request \phpbb\symfony_request */
|
||||
$symfony_request = $phpbb_container->get('symfony_request');
|
||||
|
||||
/* @var $phpbb_filesystem \phpbb\filesystem */
|
||||
$phpbb_filesystem = $phpbb_container->get('filesystem');
|
||||
|
||||
/* @var $phpbb_path_helper \phpbb\path_helper */
|
||||
$phpbb_path_helper = $phpbb_container->get('path_helper');
|
||||
$cache_path = $phpbb_root_path . 'cache/';
|
||||
|
||||
|
@ -131,6 +131,7 @@ class install_convert extends module
|
||||
$phpbb_container = $phpbb_container_builder->get_container();
|
||||
|
||||
// Create cache
|
||||
/* @var $cache \phpbb\cache\service */
|
||||
$cache = $phpbb_container->get('cache');
|
||||
|
||||
switch ($sub)
|
||||
@ -1603,6 +1604,7 @@ class install_convert extends module
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
|
||||
// And finally, add a note to the log
|
||||
/* @var $phpbb_log \phpbb\log\log_interface */
|
||||
$phpbb_log = $phpbb_container->get('log');
|
||||
add_log('admin', 'LOG_INSTALL_CONVERTED', $convert->convertor_data['forum_name'], $config['version']);
|
||||
|
||||
|
@ -108,7 +108,10 @@ class install_install extends module
|
||||
$phpbb_container = $phpbb_container_builder->get_container();
|
||||
|
||||
// Sets the global variables
|
||||
/* @var $cache \phpbb\cache\service */
|
||||
$cache = $phpbb_container->get('cache');
|
||||
|
||||
/* @var $phpbb_log \phpbb\log\log_interface */
|
||||
$phpbb_log = $phpbb_container->get('log');
|
||||
|
||||
$this->build_search_index($mode, $sub);
|
||||
@ -1517,6 +1520,7 @@ class install_install extends module
|
||||
// modules require an extension manager
|
||||
if (empty($phpbb_extension_manager))
|
||||
{
|
||||
/* @var $phpbb_extension_manager \phpbb\extension\manager */
|
||||
$phpbb_extension_manager = $phpbb_container->get('ext.manager');
|
||||
}
|
||||
|
||||
|
@ -84,6 +84,7 @@ class install_update extends module
|
||||
$phpbb_container = $phpbb_container_builder->get_container();
|
||||
|
||||
// Writes into global $cache
|
||||
/* @var $cache \phpbb\cache\service */
|
||||
$cache = $phpbb_container->get('cache');
|
||||
|
||||
$this->tpl_name = 'install_update';
|
||||
@ -161,6 +162,7 @@ class install_update extends module
|
||||
));
|
||||
|
||||
// Get current and latest version
|
||||
/* @var $version_helper \phpbb\version_helper */
|
||||
$version_helper = $phpbb_container->get('version_helper');
|
||||
try
|
||||
{
|
||||
@ -519,6 +521,8 @@ class install_update extends module
|
||||
if ($all_up_to_date)
|
||||
{
|
||||
global $phpbb_container;
|
||||
|
||||
/* @var $phpbb_log \phpbb\log\log_interface */
|
||||
$phpbb_log = $phpbb_container->get('log');
|
||||
|
||||
// Add database update to log
|
||||
|
@ -638,6 +638,7 @@ switch ($mode)
|
||||
$profile_fields = array();
|
||||
if ($config['load_cpf_viewprofile'])
|
||||
{
|
||||
/* @var $cp \phpbb\profilefields\manager */
|
||||
$cp = $phpbb_container->get('profilefields.manager');
|
||||
$profile_fields = $cp->grab_profile_fields_data($user_id);
|
||||
$profile_fields = (isset($profile_fields[$user_id])) ? $cp->generate_profile_fields_template_data($profile_fields[$user_id]) : array();
|
||||
@ -805,6 +806,8 @@ switch ($mode)
|
||||
{
|
||||
trigger_error('NO_EMAIL');
|
||||
}
|
||||
|
||||
/** @var $form \phpbb\message\form */
|
||||
$form = $phpbb_container->get('message.form.' . $form_name);
|
||||
|
||||
$form->bind($request);
|
||||
@ -860,6 +863,8 @@ switch ($mode)
|
||||
// The basic memberlist
|
||||
$page_title = $user->lang['MEMBERLIST'];
|
||||
$template_html = 'memberlist_body.html';
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
||||
// Sorting
|
||||
@ -1366,6 +1371,7 @@ switch ($mode)
|
||||
// Load custom profile fields
|
||||
if ($config['load_cpf_memberlist'])
|
||||
{
|
||||
/* @var $cp \phpbb\profilefields\manager */
|
||||
$cp = $phpbb_container->get('profilefields.manager');
|
||||
|
||||
$cp_row = $cp->generate_profile_fields_template_headlines('field_show_on_ml');
|
||||
|
@ -929,6 +929,7 @@ class auth
|
||||
{
|
||||
global $db, $user, $phpbb_root_path, $phpEx, $phpbb_container;
|
||||
|
||||
/* @var $provider_collection \phpbb\auth\provider_collection */
|
||||
$provider_collection = $phpbb_container->get('auth.provider_collection');
|
||||
|
||||
$provider = $provider_collection->get_provider();
|
||||
|
@ -155,6 +155,7 @@ class db extends \phpbb\auth\provider\base
|
||||
// Every auth module is able to define what to do by itself...
|
||||
if ($show_captcha)
|
||||
{
|
||||
/* @var $captcha_factory \phpbb\captcha\factory */
|
||||
$captcha_factory = $this->phpbb_container->get('captcha.factory');
|
||||
$captcha = $captcha_factory->get_instance($this->config['captcha_plugin']);
|
||||
$captcha->init(CONFIRM_LOGIN);
|
||||
|
@ -57,6 +57,7 @@ class release_3_0_5_rc1 extends \phpbb\db\migration\migration
|
||||
{
|
||||
global $phpbb_container;
|
||||
|
||||
/* @var $passwords_manager \phpbb\passwords\manager */
|
||||
$passwords_manager = $phpbb_container->get('passwords.manager');
|
||||
$sql = 'SELECT user_id, user_password
|
||||
FROM ' . $this->table_prefix . 'users
|
||||
|
@ -238,6 +238,8 @@ abstract class profilefield_base_migration extends \phpbb\db\migration\migration
|
||||
if ($profile_row === null)
|
||||
{
|
||||
global $phpbb_container;
|
||||
|
||||
/* @var $manager \phpbb\profilefields\manager */
|
||||
$manager = $phpbb_container->get('profilefields.manager');
|
||||
$profile_row = $manager->build_insert_sql_array(array());
|
||||
}
|
||||
|
@ -409,6 +409,7 @@ class session
|
||||
$session_expired = false;
|
||||
|
||||
// Check whether the session is still valid if we have one
|
||||
/* @var $provider_collection \phpbb\auth\provider_collection */
|
||||
$provider_collection = $phpbb_container->get('auth.provider_collection');
|
||||
$provider = $provider_collection->get_provider();
|
||||
|
||||
@ -578,6 +579,7 @@ class session
|
||||
}
|
||||
}
|
||||
|
||||
/* @var $provider_collection \phpbb\auth\provider_collection */
|
||||
$provider_collection = $phpbb_container->get('auth.provider_collection');
|
||||
$provider = $provider_collection->get_provider();
|
||||
$this->data = $provider->autologin();
|
||||
@ -910,6 +912,7 @@ class session
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Allow connecting logout with external auth method logout
|
||||
/* @var $provider_collection \phpbb\auth\provider_collection */
|
||||
$provider_collection = $phpbb_container->get('auth.provider_collection');
|
||||
$provider = $provider_collection->get_provider();
|
||||
$provider->logout($this->data, $new_session);
|
||||
@ -1036,6 +1039,7 @@ class session
|
||||
}
|
||||
|
||||
// only called from CRON; should be a safe workaround until the infrastructure gets going
|
||||
/* @var $captcha_factory \phpbb\captcha\factory */
|
||||
$captcha_factory = $phpbb_container->get('captcha.factory');
|
||||
$captcha_factory->garbage_collect($config['captcha_plugin']);
|
||||
|
||||
|
@ -116,6 +116,7 @@ if (in_array($mode, array('post', 'reply', 'quote', 'edit', 'delete')) && !$foru
|
||||
trigger_error('NO_FORUM');
|
||||
}
|
||||
|
||||
/* @var $phpbb_content_visibility \phpbb\content_visibility */
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
|
||||
// We need to know some basic information in all cases before we do anything.
|
||||
@ -561,7 +562,10 @@ if ($mode == 'edit')
|
||||
$orig_poll_options_size = sizeof($post_data['poll_options']);
|
||||
|
||||
$message_parser = new parse_message();
|
||||
/* @var $plupload \phpbb\plupload\plupload */
|
||||
$plupload = $phpbb_container->get('plupload');
|
||||
|
||||
/* @var $mimetype_guesser \phpbb\mimetype\guesser */
|
||||
$mimetype_guesser = $phpbb_container->get('mimetype.guesser');
|
||||
$message_parser->set_plupload($plupload);
|
||||
$message_parser->set_mimetype_guesser($mimetype_guesser);
|
||||
|
@ -228,6 +228,7 @@ if ($submit && $reason_id)
|
||||
$db->sql_query($sql);
|
||||
$report_id = $db->sql_nextid();
|
||||
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
if ($post_id)
|
||||
|
@ -123,7 +123,10 @@ $sort_by_text = array('a' => $user->lang['SORT_AUTHOR'], 't' => $user->lang['SOR
|
||||
$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
|
||||
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
|
||||
|
||||
/* @var $phpbb_content_visibility \phpbb\content_visibility */
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
||||
if ($keywords || $author || $author_id || $search_id || $submit)
|
||||
|
@ -37,6 +37,7 @@ $sort_days = request_var('st', $default_sort_days);
|
||||
$sort_key = request_var('sk', $default_sort_key);
|
||||
$sort_dir = request_var('sd', $default_sort_dir);
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
||||
// Check if the user has actually sent a forum ID with his/her request
|
||||
@ -146,6 +147,7 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
/* @var $phpbb_content_visibility \phpbb\content_visibility */
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
|
||||
// Dump out the page header and load viewforum template
|
||||
@ -218,6 +220,7 @@ if ($forum_data['forum_topics_per_page'])
|
||||
// Do the forum Prune thang - cron type job ...
|
||||
if (!$config['use_system_cron'])
|
||||
{
|
||||
/* @var $cron \phpbb\cron\manager */
|
||||
$cron = $phpbb_container->get('cron.manager');
|
||||
|
||||
$task = $cron->find_task('cron.task.core.prune_forum');
|
||||
|
@ -43,7 +43,10 @@ if (!$auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel'))
|
||||
login_box('', $user->lang['LOGIN_EXPLAIN_VIEWONLINE']);
|
||||
}
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
||||
/* @var $viewonline_helper \phpbb\viewonline_helper */
|
||||
$viewonline_helper = $phpbb_container->get('viewonline_helper');
|
||||
|
||||
$sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_JOINED'], 'c' => $user->lang['SORT_LOCATION']);
|
||||
|
@ -48,6 +48,7 @@ $sort_dir = request_var('sd', $default_sort_dir);
|
||||
|
||||
$update = request_var('update', false);
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
||||
$s_can_vote = false;
|
||||
@ -62,6 +63,7 @@ if (!$topic_id && !$post_id)
|
||||
trigger_error('NO_TOPIC');
|
||||
}
|
||||
|
||||
/* @var $phpbb_content_visibility \phpbb\content_visibility */
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
|
||||
// Find topic id if user requested a newer or older topic
|
||||
@ -1314,6 +1316,7 @@ $db->sql_freeresult($result);
|
||||
// Load custom profile fields
|
||||
if ($config['load_cpf_viewtopic'])
|
||||
{
|
||||
/* @var $cp \phpbb\profilefields\manager */
|
||||
$cp = $phpbb_container->get('profilefields.manager');
|
||||
|
||||
// Grab all profile fields from users in id cache for later use - similar to the poster cache
|
||||
|
Loading…
x
Reference in New Issue
Block a user