mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-06 14:35:56 +02:00
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8701 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
fe72c1e3cf
commit
8f2a42c2d2
@ -91,7 +91,8 @@
|
|||||||
<li>[Change] More restrictive chmod to new files being created.</li>
|
<li>[Change] More restrictive chmod to new files being created.</li>
|
||||||
<li>[Feature] Allow limited inheritance for templates sets.</li>
|
<li>[Feature] Allow limited inheritance for templates sets.</li>
|
||||||
<li>[Feature] Allow hard disabling of the template editor.</li>
|
<li>[Feature] Allow hard disabling of the template editor.</li>
|
||||||
</ul>
|
<li>[Fix] Delete avatar files (Bug #29985).</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<a name="v301"></a><h3>1.ii. Changes since 3.0.1</h3>
|
<a name="v301"></a><h3>1.ii. Changes since 3.0.1</h3>
|
||||||
|
|
||||||
|
@ -2297,22 +2297,23 @@ function avatar_process_user(&$error, $custom_userdata = false)
|
|||||||
// Do we actually have any data to update?
|
// Do we actually have any data to update?
|
||||||
if (sizeof($sql_ary))
|
if (sizeof($sql_ary))
|
||||||
{
|
{
|
||||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
|
||||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
|
||||||
WHERE user_id = ' . (($custom_userdata === false) ? $user->data['user_id'] : $custom_userdata['user_id']);
|
|
||||||
$db->sql_query($sql);
|
|
||||||
|
|
||||||
if (isset($sql_ary['user_avatar']))
|
if (isset($sql_ary['user_avatar']))
|
||||||
{
|
{
|
||||||
$userdata = ($custom_userdata === false) ? $user->data : $custom_userdata;
|
$userdata = ($custom_userdata === false) ? $user->data : $custom_userdata;
|
||||||
|
|
||||||
// Delete old avatar if present
|
// Delete old avatar if present
|
||||||
if ((!empty($userdata['user_avatar']) && empty($sql_ary['user_avatar']) && $userdata['user_avatar_type'] == AVATAR_UPLOAD)
|
if ((!empty($userdata['user_avatar']) && empty($sql_ary['user_avatar']) && $userdata['user_avatar_type'] == AVATAR_UPLOAD)
|
||||||
|| ( !empty($userdata['user_avatar']) && !empty($sql_ary['user_avatar']) && $userdata['user_avatar_type'] == AVATAR_UPLOAD && $sql_ary['user_avatar_type'] != AVATAR_UPLOAD))
|
|| ( !empty($userdata['user_avatar']) && !empty($sql_ary['user_avatar']) && $userdata['user_avatar_type'] == AVATAR_UPLOAD))
|
||||||
{
|
{
|
||||||
avatar_delete('user', $userdata);
|
avatar_delete('user', $userdata);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||||
|
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||||
|
WHERE user_id = ' . (($custom_userdata === false) ? $user->data['user_id'] : $custom_userdata['user_id']);
|
||||||
|
$db->sql_query($sql);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user