mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-26 09:44:26 +02:00
[ticket/11700] Move all recent code to namespaces
PHPBB3-11700
This commit is contained in:
@@ -1472,7 +1472,7 @@ class acp_attachments
|
||||
$ip_list = array_unique(explode("\n", $ips));
|
||||
$ip_list_log = implode(', ', $ip_list);
|
||||
|
||||
$ip_exclude = (int) $request->variable('ipexclude', false, false, phpbb_request_request_interface::POST);
|
||||
$ip_exclude = (int) $request->variable('ipexclude', false, false, \phpbb\request\request_interface::POST);
|
||||
|
||||
$iplist = array();
|
||||
$hostlist = array();
|
||||
|
@@ -275,7 +275,7 @@ class acp_bbcodes
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new phpbb_json_response;
|
||||
$json_response = new \phpbb\json_response;
|
||||
$json_response->send(array(
|
||||
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||
'MESSAGE_TEXT' => $user->lang['BBCODE_DELETED'],
|
||||
|
@@ -679,7 +679,7 @@ class acp_board
|
||||
|
||||
foreach ($auth_providers as $key => $value)
|
||||
{
|
||||
if (!($value instanceof phpbb_auth_provider_provider_interface))
|
||||
if (!($value instanceof \phpbb\auth\provider\provider_interface))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@@ -355,7 +355,7 @@ class acp_bots
|
||||
|
||||
if ($request->is_ajax() && ($action == 'activate' || $action == 'deactivate'))
|
||||
{
|
||||
$json_response = new phpbb_json_response;
|
||||
$json_response = new \phpbb\json_response;
|
||||
$json_response->send(array(
|
||||
'text' => $user->lang['BOT_' . (($action == 'activate') ? 'DE' : '') . 'ACTIVATE'],
|
||||
));
|
||||
|
@@ -28,7 +28,7 @@ class acp_database
|
||||
global $cache, $db, $user, $auth, $template, $table_prefix;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
|
||||
$this->db_tools = new phpbb_db_tools($db);
|
||||
$this->db_tools = new \phpbb\db\tools($db);
|
||||
|
||||
$user->add_lang('acp/database');
|
||||
|
||||
|
@@ -58,13 +58,13 @@ class acp_extensions
|
||||
// If they've specified an extension, let's load the metadata manager and validate it.
|
||||
if ($ext_name)
|
||||
{
|
||||
$md_manager = new phpbb_extension_metadata_manager($ext_name, $config, $phpbb_extension_manager, $template, $phpbb_root_path);
|
||||
$md_manager = new \phpbb\extension\metadata_manager($ext_name, $config, $phpbb_extension_manager, $template, $phpbb_root_path);
|
||||
|
||||
try
|
||||
{
|
||||
$md_manager->get_metadata('all');
|
||||
}
|
||||
catch(phpbb_extension_exception $e)
|
||||
catch(\phpbb\extension\exception $e)
|
||||
{
|
||||
trigger_error($e);
|
||||
}
|
||||
@@ -120,7 +120,7 @@ class acp_extensions
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (phpbb_db_migration_exception $e)
|
||||
catch (\phpbb\db\migration\exception $e)
|
||||
{
|
||||
$template->assign_var('MIGRATOR_ERROR', $e->getLocalisedMessage($user));
|
||||
}
|
||||
@@ -188,7 +188,7 @@ class acp_extensions
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (phpbb_db_migration_exception $e)
|
||||
catch (\phpbb\db\migration\exception $e)
|
||||
{
|
||||
$template->assign_var('MIGRATOR_ERROR', $e->getLocalisedMessage($user));
|
||||
}
|
||||
@@ -217,7 +217,7 @@ class acp_extensions
|
||||
* @param $phpbb_extension_manager An instance of the extension manager
|
||||
* @return null
|
||||
*/
|
||||
public function list_enabled_exts(phpbb_extension_manager $phpbb_extension_manager)
|
||||
public function list_enabled_exts(\phpbb\extension\manager $phpbb_extension_manager)
|
||||
{
|
||||
foreach ($phpbb_extension_manager->all_enabled() as $name => $location)
|
||||
{
|
||||
@@ -236,7 +236,7 @@ class acp_extensions
|
||||
'PURGE' => $this->u_action . '&action=purge_pre&ext_name=' . urlencode($name),
|
||||
));
|
||||
}
|
||||
catch(phpbb_extension_exception $e)
|
||||
catch(\phpbb\extension\exception $e)
|
||||
{
|
||||
$this->template->assign_block_vars('disabled', array(
|
||||
'META_DISPLAY_NAME' => $this->user->lang('EXTENSION_INVALID_LIST', $name, $e),
|
||||
@@ -251,7 +251,7 @@ class acp_extensions
|
||||
* @param $phpbb_extension_manager An instance of the extension manager
|
||||
* @return null
|
||||
*/
|
||||
public function list_disabled_exts(phpbb_extension_manager $phpbb_extension_manager)
|
||||
public function list_disabled_exts(\phpbb\extension\manager $phpbb_extension_manager)
|
||||
{
|
||||
foreach ($phpbb_extension_manager->all_disabled() as $name => $location)
|
||||
{
|
||||
@@ -270,7 +270,7 @@ class acp_extensions
|
||||
'PURGE' => $this->u_action . '&action=purge_pre&ext_name=' . urlencode($name),
|
||||
));
|
||||
}
|
||||
catch(phpbb_extension_exception $e)
|
||||
catch(\phpbb\extension\exception $e)
|
||||
{
|
||||
$this->template->assign_block_vars('disabled', array(
|
||||
'META_DISPLAY_NAME' => $this->user->lang('EXTENSION_INVALID_LIST', $name, $e),
|
||||
@@ -285,7 +285,7 @@ class acp_extensions
|
||||
* @param $phpbb_extension_manager An instance of the extension manager
|
||||
* @return null
|
||||
*/
|
||||
public function list_available_exts(phpbb_extension_manager $phpbb_extension_manager)
|
||||
public function list_available_exts(\phpbb\extension\manager $phpbb_extension_manager)
|
||||
{
|
||||
$uninstalled = array_diff_key($phpbb_extension_manager->all_available(), $phpbb_extension_manager->all_configured());
|
||||
|
||||
@@ -305,7 +305,7 @@ class acp_extensions
|
||||
'ENABLE' => $this->u_action . '&action=enable_pre&ext_name=' . urlencode($name),
|
||||
));
|
||||
}
|
||||
catch(phpbb_extension_exception $e)
|
||||
catch(\phpbb\extension\exception $e)
|
||||
{
|
||||
$this->template->assign_block_vars('disabled', array(
|
||||
'META_DISPLAY_NAME' => $this->user->lang('EXTENSION_INVALID_LIST', $name, $e),
|
||||
|
@@ -269,7 +269,7 @@ class acp_forums
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new phpbb_json_response;
|
||||
$json_response = new \phpbb\json_response;
|
||||
$json_response->send(array('success' => ($move_forum_name !== false)));
|
||||
}
|
||||
|
||||
|
@@ -324,7 +324,7 @@ class acp_groups
|
||||
$avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();
|
||||
|
||||
// This is normalised data, without the group_ prefix
|
||||
$avatar_data = phpbb_avatar_manager::clean_row($group_row);
|
||||
$avatar_data = \phpbb\avatar\manager::clean_row($group_row);
|
||||
}
|
||||
|
||||
|
||||
@@ -891,7 +891,7 @@ class acp_groups
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (phpbb_groupposition_exception $exception)
|
||||
catch (\phpbb\groupposition\exception $exception)
|
||||
{
|
||||
trigger_error($user->lang($exception->getMessage()) . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
@@ -919,7 +919,7 @@ class acp_groups
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (phpbb_groupposition_exception $exception)
|
||||
catch (\phpbb\groupposition\exception $exception)
|
||||
{
|
||||
trigger_error($user->lang($exception->getMessage()) . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
@@ -943,7 +943,7 @@ class acp_groups
|
||||
|
||||
if (($action == 'move_up' || $action == 'move_down') && $request->is_ajax())
|
||||
{
|
||||
$json_response = new phpbb_json_response;
|
||||
$json_response = new \phpbb\json_response;
|
||||
$json_response->send(array('success' => true));
|
||||
}
|
||||
|
||||
@@ -961,7 +961,7 @@ class acp_groups
|
||||
$template->assign_block_vars('legend', array(
|
||||
'GROUP_NAME' => $group_name,
|
||||
'GROUP_COLOUR' => ($row['group_colour']) ? '#' . $row['group_colour'] : '',
|
||||
'GROUP_TYPE' => $user->lang[phpbb_groupposition_legend::group_type_language($row['group_type'])],
|
||||
'GROUP_TYPE' => $user->lang[\phpbb\groupposition\legend::group_type_language($row['group_type'])],
|
||||
|
||||
'U_MOVE_DOWN' => "{$this->u_action}&field=legend&action=move_down&g=" . $row['group_id'],
|
||||
'U_MOVE_UP' => "{$this->u_action}&field=legend&action=move_up&g=" . $row['group_id'],
|
||||
@@ -1004,7 +1004,7 @@ class acp_groups
|
||||
if ($row['group_id'])
|
||||
{
|
||||
$group_name = ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'];
|
||||
$group_type = $user->lang[phpbb_groupposition_teampage::group_type_language($row['group_type'])];
|
||||
$group_type = $user->lang[\phpbb\groupposition\teampage::group_type_language($row['group_type'])];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -338,7 +338,7 @@ class acp_icons
|
||||
$image_display_on_posting = (isset($_POST['display_on_posting'])) ? request_var('display_on_posting', array('' => 0)) : array();
|
||||
|
||||
// Ok, add the relevant bits if we are adding new codes to existing emoticons...
|
||||
if ($request->variable('add_additional_code', false, false, phpbb_request_request_interface::POST))
|
||||
if ($request->variable('add_additional_code', false, false, \phpbb\request\request_interface::POST))
|
||||
{
|
||||
$add_image = request_var('add_image', '');
|
||||
$add_code = utf8_normalize_nfc(request_var('add_code', '', true));
|
||||
@@ -354,7 +354,7 @@ class acp_icons
|
||||
$image_width[$add_image] = request_var('add_width', 0);
|
||||
$image_height[$add_image] = request_var('add_height', 0);
|
||||
|
||||
if ($request->variable('add_display_on_posting', false, false, phpbb_request_request_interface::POST))
|
||||
if ($request->variable('add_display_on_posting', false, false, \phpbb\request\request_interface::POST))
|
||||
{
|
||||
$image_display_on_posting[$add_image] = 1;
|
||||
}
|
||||
@@ -785,7 +785,7 @@ class acp_icons
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new phpbb_json_response;
|
||||
$json_response = new \phpbb\json_response;
|
||||
$json_response->send(array(
|
||||
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||
'MESSAGE_TEXT' => $notice,
|
||||
|
@@ -161,7 +161,7 @@ class acp_language
|
||||
'method' => $method)
|
||||
);
|
||||
|
||||
$hidden_data .= build_hidden_fields(array('entry' => $request->variable('entry', $request_default, true, phpbb_request_request_interface::POST)));
|
||||
$hidden_data .= build_hidden_fields(array('entry' => $request->variable('entry', $request_default, true, \phpbb\request\request_interface::POST)));
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_UPLOAD' => true,
|
||||
@@ -218,7 +218,7 @@ class acp_language
|
||||
trigger_error($user->lang['FORM_INVALID']. adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$entry_value = $request->variable('entry', $request_default, true, phpbb_request_request_interface::POST);
|
||||
$entry_value = $request->variable('entry', $request_default, true, \phpbb\request\request_interface::POST);
|
||||
|
||||
if (!$lang_id || !$entry_value)
|
||||
{
|
||||
|
@@ -35,8 +35,8 @@ class acp_logs
|
||||
$forum_id = request_var('f', 0);
|
||||
$topic_id = request_var('t', 0);
|
||||
$start = request_var('start', 0);
|
||||
$deletemark = $request->variable('delmarked', false, false, phpbb_request_request_interface::POST);
|
||||
$deleteall = $request->variable('delall', false, false, phpbb_request_request_interface::POST);
|
||||
$deletemark = $request->variable('delmarked', false, false, \phpbb\request\request_interface::POST);
|
||||
$deleteall = $request->variable('delall', false, false, \phpbb\request\request_interface::POST);
|
||||
$marked = request_var('mark', array(0));
|
||||
|
||||
// Sort keys
|
||||
|
@@ -375,7 +375,7 @@ class acp_modules
|
||||
{
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new phpbb_json_response;
|
||||
$json_response = new \phpbb\json_response;
|
||||
$json_response->send(array(
|
||||
'MESSAGE_TITLE' => $user->lang('ERROR'),
|
||||
'MESSAGE_TEXT' => implode('<br />', $errors),
|
||||
|
@@ -676,7 +676,7 @@ class acp_permissions
|
||||
list($ug_id, ) = each($psubmit);
|
||||
list($forum_id, ) = each($psubmit[$ug_id]);
|
||||
|
||||
$settings = $request->variable('setting', array(0 => array(0 => array('' => 0))), false, phpbb_request_request_interface::POST);
|
||||
$settings = $request->variable('setting', array(0 => array(0 => array('' => 0))), false, \phpbb\request\request_interface::POST);
|
||||
if (empty($settings) || empty($settings[$ug_id]) || empty($settings[$ug_id][$forum_id]))
|
||||
{
|
||||
trigger_error('WRONG_PERMISSION_SETTING_FORMAT', E_USER_WARNING);
|
||||
@@ -685,7 +685,7 @@ class acp_permissions
|
||||
$auth_settings = $settings[$ug_id][$forum_id];
|
||||
|
||||
// Do we have a role we want to set?
|
||||
$roles = $request->variable('role', array(0 => array(0 => 0)), false, phpbb_request_request_interface::POST);
|
||||
$roles = $request->variable('role', array(0 => array(0 => 0)), false, \phpbb\request\request_interface::POST);
|
||||
$assigned_role = (isset($roles[$ug_id][$forum_id])) ? (int) $roles[$ug_id][$forum_id] : 0;
|
||||
|
||||
// Do the admin want to set these permissions to other items too?
|
||||
@@ -757,8 +757,8 @@ class acp_permissions
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$auth_settings = $request->variable('setting', array(0 => array(0 => array('' => 0))), false, phpbb_request_request_interface::POST);
|
||||
$auth_roles = $request->variable('role', array(0 => array(0 => 0)), false, phpbb_request_request_interface::POST);
|
||||
$auth_settings = $request->variable('setting', array(0 => array(0 => array('' => 0))), false, \phpbb\request\request_interface::POST);
|
||||
$auth_roles = $request->variable('role', array(0 => array(0 => 0)), false, \phpbb\request\request_interface::POST);
|
||||
$ug_ids = $forum_ids = array();
|
||||
|
||||
// We need to go through the auth settings
|
||||
@@ -1100,7 +1100,7 @@ class acp_permissions
|
||||
{
|
||||
if ($user_id != $user->data['user_id'])
|
||||
{
|
||||
$auth2 = new phpbb_auth();
|
||||
$auth2 = new \phpbb\auth\auth();
|
||||
$auth2->acl($userdata);
|
||||
$auth_setting = $auth2->acl_get($permission);
|
||||
}
|
||||
|
@@ -245,7 +245,7 @@ class acp_profile
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new phpbb_json_response();
|
||||
$json_response = new \phpbb\json_response();
|
||||
$json_response->send(array(
|
||||
'text' => $user->lang('DEACTIVATE'),
|
||||
));
|
||||
@@ -277,7 +277,7 @@ class acp_profile
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new phpbb_json_response();
|
||||
$json_response = new \phpbb\json_response();
|
||||
$json_response->send(array(
|
||||
'text' => $user->lang('ACTIVATE'),
|
||||
));
|
||||
@@ -510,7 +510,7 @@ class acp_profile
|
||||
$cp->vars['field_default_value_month'] = $now['mon'];
|
||||
$cp->vars['field_default_value_year'] = $now['year'];
|
||||
$var = 'now';
|
||||
$request->overwrite('field_default_value', $var, phpbb_request_request_interface::POST);
|
||||
$request->overwrite('field_default_value', $var, \phpbb\request\request_interface::POST);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -520,7 +520,7 @@ class acp_profile
|
||||
$cp->vars['field_default_value_month'] = request_var('field_default_value_month', 0);
|
||||
$cp->vars['field_default_value_year'] = request_var('field_default_value_year', 0);
|
||||
$var = sprintf('%2d-%2d-%4d', $cp->vars['field_default_value_day'], $cp->vars['field_default_value_month'], $cp->vars['field_default_value_year']);
|
||||
$request->overwrite('field_default_value', $var, phpbb_request_request_interface::POST);
|
||||
$request->overwrite('field_default_value', $var, \phpbb\request\request_interface::POST);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -125,7 +125,7 @@ class acp_ranks
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
$json_response = new phpbb_json_response;
|
||||
$json_response = new \phpbb\json_response;
|
||||
$json_response->send(array(
|
||||
'MESSAGE_TITLE' => $user->lang['INFORMATION'],
|
||||
'MESSAGE_TEXT' => $user->lang['RANK_REMOVED'],
|
||||
|
@@ -1604,7 +1604,7 @@ class acp_users
|
||||
|| $user_row['user_allow_viewonline'] && !$sql_ary['user_allow_viewonline'])
|
||||
{
|
||||
// We also need to check if the user has the permission to cloak.
|
||||
$user_auth = new phpbb_auth();
|
||||
$user_auth = new \phpbb\auth\auth();
|
||||
$user_auth->acl($user_row);
|
||||
|
||||
$session_sql_ary = array(
|
||||
@@ -1742,7 +1742,7 @@ class acp_users
|
||||
$avatar_drivers = $phpbb_avatar_manager->get_enabled_drivers();
|
||||
|
||||
// This is normalised data, without the user_ prefix
|
||||
$avatar_data = phpbb_avatar_manager::clean_row($user_row);
|
||||
$avatar_data = \phpbb\avatar\manager::clean_row($user_row);
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
|
@@ -19,7 +19,7 @@ if (!defined('IN_PHPBB'))
|
||||
* ACP Permission/Auth class
|
||||
* @package phpBB3
|
||||
*/
|
||||
class auth_admin extends phpbb_auth
|
||||
class auth_admin extends \phpbb\auth\auth
|
||||
{
|
||||
/**
|
||||
* Init auth settings
|
||||
@@ -130,7 +130,7 @@ class auth_admin extends phpbb_auth
|
||||
{
|
||||
if ($user->data['user_id'] != $userdata['user_id'])
|
||||
{
|
||||
$auth2 = new phpbb_auth();
|
||||
$auth2 = new \phpbb\auth\auth();
|
||||
$auth2->acl($userdata);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user