mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-05 15:16:16 +02:00
[ticket/11842] Replace outdated occurences of user and group avatar_type
user_avatar_type und group_avatar_type are now a string and should therefore be treated accordingly. PHPBB3-11842
This commit is contained in:
parent
3c632fa8e4
commit
1f624e1367
@ -213,7 +213,7 @@ function user_add($user_row, $cp_data = false)
|
||||
'user_occ' => '',
|
||||
'user_interests' => '',
|
||||
'user_avatar' => '',
|
||||
'user_avatar_type' => 0,
|
||||
'user_avatar_type' => '',
|
||||
'user_avatar_width' => 0,
|
||||
'user_avatar_height' => 0,
|
||||
'user_new_privmsg' => 0,
|
||||
@ -463,7 +463,7 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
$added_guest_posts = 0;
|
||||
foreach ($user_rows as $user_id => $user_row)
|
||||
{
|
||||
if ($user_row['user_avatar'] && $user_row['user_avatar_type'] == AVATAR_UPLOAD)
|
||||
if ($user_row['user_avatar'] && ($user_row['user_avatar_type'] == AVATAR_UPLOAD || $user_row['user_avatar_type'] == 'avatar.driver.upload'))
|
||||
{
|
||||
avatar_delete('user', $user_row);
|
||||
}
|
||||
@ -2415,7 +2415,7 @@ function avatar_remove_db($avatar_name)
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||
SET user_avatar = '',
|
||||
user_avatar_type = 0
|
||||
user_avatar_type = ''
|
||||
WHERE user_avatar = '" . $db->sql_escape($avatar_name) . '\'';
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
@ -2825,7 +2825,7 @@ function remove_default_avatar($group_id, $user_ids)
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||
SET user_avatar = '',
|
||||
user_avatar_type = 0,
|
||||
user_avatar_type = '',
|
||||
user_avatar_width = 0,
|
||||
user_avatar_height = 0
|
||||
WHERE group_id = " . (int) $group_id . "
|
||||
@ -3083,7 +3083,7 @@ function group_set_user_default($group_id, $user_id_ary, $group_attributes = fal
|
||||
'group_colour' => 'string',
|
||||
'group_rank' => 'int',
|
||||
'group_avatar' => 'string',
|
||||
'group_avatar_type' => 'int',
|
||||
'group_avatar_type' => 'string',
|
||||
'group_avatar_width' => 'int',
|
||||
'group_avatar_height' => 'int',
|
||||
);
|
||||
|
@ -27,7 +27,7 @@ class phpbb_functions_user_group_user_attributes_test extends phpbb_database_tes
|
||||
2,
|
||||
array(
|
||||
'group_avatar' => '',
|
||||
'group_avatar_type' => 0,
|
||||
'group_avatar_type' => '',
|
||||
'group_avatar_height' => 0,
|
||||
'group_avatar_width' => 0,
|
||||
'group_rank' => 0,
|
||||
@ -43,7 +43,7 @@ class phpbb_functions_user_group_user_attributes_test extends phpbb_database_tes
|
||||
2,
|
||||
array(
|
||||
'group_avatar' => '',
|
||||
'group_avatar_type' => 0,
|
||||
'group_avatar_type' => '',
|
||||
'group_avatar_height' => 0,
|
||||
'group_avatar_width' => 0,
|
||||
'group_rank' => 0,
|
||||
@ -59,7 +59,7 @@ class phpbb_functions_user_group_user_attributes_test extends phpbb_database_tes
|
||||
2,
|
||||
array(
|
||||
'group_avatar' => '',
|
||||
'group_avatar_type' => 0,
|
||||
'group_avatar_type' => '',
|
||||
'group_avatar_height' => 0,
|
||||
'group_avatar_width' => 0,
|
||||
'group_rank' => 0,
|
||||
@ -75,7 +75,7 @@ class phpbb_functions_user_group_user_attributes_test extends phpbb_database_tes
|
||||
3,
|
||||
array(
|
||||
'group_avatar' => 'default2',
|
||||
'group_avatar_type' => 1,
|
||||
'group_avatar_type' => 'avatar.driver.upload',
|
||||
'group_avatar_height' => 1,
|
||||
'group_avatar_width' => 1,
|
||||
'group_rank' => 3,
|
||||
@ -91,7 +91,7 @@ class phpbb_functions_user_group_user_attributes_test extends phpbb_database_tes
|
||||
3,
|
||||
array(
|
||||
'group_avatar' => 'default2',
|
||||
'group_avatar_type' => 1,
|
||||
'group_avatar_type' => 'avatar.driver.upload',
|
||||
'group_avatar_height' => 1,
|
||||
'group_avatar_width' => 1,
|
||||
'group_rank' => 3,
|
||||
@ -107,7 +107,7 @@ class phpbb_functions_user_group_user_attributes_test extends phpbb_database_tes
|
||||
3,
|
||||
array(
|
||||
'group_avatar' => 'default2',
|
||||
'group_avatar_type' => 1,
|
||||
'group_avatar_type' => 'avatar.driver.upload',
|
||||
'group_avatar_height' => 1,
|
||||
'group_avatar_width' => 1,
|
||||
'group_rank' => 3,
|
||||
|
Loading…
x
Reference in New Issue
Block a user