mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 17:27:16 +02:00
[ticket/13454] Remove unused variables
This is part 5 and there is more to come. PHPBB3-13454
This commit is contained in:
@@ -866,7 +866,7 @@ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
|
||||
*/
|
||||
function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason = '')
|
||||
{
|
||||
global $db, $user, $auth, $cache, $phpbb_log;
|
||||
global $db, $user, $cache, $phpbb_log;
|
||||
|
||||
// Delete stale bans
|
||||
$sql = 'DELETE FROM ' . BANLIST_TABLE . '
|
||||
@@ -1015,7 +1015,6 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
|
||||
if ($ip_2_counter == 0 && $ip_2_end == 254)
|
||||
{
|
||||
$ip_2_counter = 256;
|
||||
$ip_2_fragment = 256;
|
||||
|
||||
$banlist_ary[] = "$ip_1_counter.*";
|
||||
}
|
||||
@@ -1028,7 +1027,6 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
|
||||
if ($ip_3_counter == 0 && $ip_3_end == 254)
|
||||
{
|
||||
$ip_3_counter = 256;
|
||||
$ip_3_fragment = 256;
|
||||
|
||||
$banlist_ary[] = "$ip_1_counter.$ip_2_counter.*";
|
||||
}
|
||||
@@ -1041,7 +1039,6 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
|
||||
if ($ip_4_counter == 0 && $ip_4_end == 254)
|
||||
{
|
||||
$ip_4_counter = 256;
|
||||
$ip_4_fragment = 256;
|
||||
|
||||
$banlist_ary[] = "$ip_1_counter.$ip_2_counter.$ip_3_counter.*";
|
||||
}
|
||||
@@ -2141,7 +2138,7 @@ function phpbb_style_is_active($style_id)
|
||||
*/
|
||||
function avatar_delete($mode, $row, $clean_db = false)
|
||||
{
|
||||
global $phpbb_root_path, $config, $db, $user;
|
||||
global $phpbb_root_path, $config;
|
||||
|
||||
// Check if the users avatar is actually *not* a group avatar
|
||||
if ($mode == 'user')
|
||||
@@ -2213,7 +2210,7 @@ function phpbb_avatar_explanation_string()
|
||||
*/
|
||||
function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow_desc_bbcode = false, $allow_desc_urls = false, $allow_desc_smilies = false)
|
||||
{
|
||||
global $phpbb_root_path, $config, $db, $user, $file_upload, $phpbb_container, $phpbb_log;
|
||||
global $db, $user, $phpbb_container, $phpbb_log;
|
||||
|
||||
/** @var \phpbb\group\helper $group_helper */
|
||||
$group_helper = $phpbb_container->get('group_helper');
|
||||
@@ -2325,8 +2322,6 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow
|
||||
// Setting the log message before we set the group id (if group gets added)
|
||||
$log = ($group_id) ? 'LOG_GROUP_UPDATED' : 'LOG_GROUP_CREATED';
|
||||
|
||||
$query = '';
|
||||
|
||||
if ($group_id)
|
||||
{
|
||||
$sql = 'SELECT user_id
|
||||
@@ -2508,7 +2503,7 @@ function group_correct_avatar($group_id, $old_entry)
|
||||
*/
|
||||
function avatar_remove_db($avatar_name)
|
||||
{
|
||||
global $config, $db;
|
||||
global $db;
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||
SET user_avatar = '',
|
||||
@@ -3012,7 +3007,7 @@ function remove_default_rank($group_id, $user_ids)
|
||||
*/
|
||||
function group_user_attributes($action, $group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $group_attributes = false)
|
||||
{
|
||||
global $db, $auth, $user, $phpbb_root_path, $phpEx, $config, $phpbb_container, $phpbb_log;
|
||||
global $db, $auth, $user, $phpbb_container, $phpbb_log;
|
||||
|
||||
// We need both username and user_id info
|
||||
$result = user_get_id_name($user_id_ary, $username_ary);
|
||||
@@ -3159,7 +3154,7 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
|
||||
*/
|
||||
function group_validate_groupname($group_id, $group_name)
|
||||
{
|
||||
global $config, $db;
|
||||
global $db;
|
||||
|
||||
$group_name = utf8_clean_string($group_name);
|
||||
|
||||
@@ -3356,7 +3351,7 @@ function group_set_user_default($group_id, $user_id_ary, $group_attributes = fal
|
||||
*/
|
||||
function get_group_name($group_id)
|
||||
{
|
||||
global $db, $user, $phpbb_container;
|
||||
global $db, $phpbb_container;
|
||||
|
||||
$sql = 'SELECT group_name, group_type
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
|
Reference in New Issue
Block a user