mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
git-svn-id: file:///svn/phpbb/trunk@7740 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
1667a17923
commit
16f60f8838
4 changed files with 24 additions and 4 deletions
|
@ -256,7 +256,7 @@ p a {
|
|||
<li>[Fix] Remember selected language while registering after submit (Bug #11435)</li>
|
||||
<li>[Fix] UTF-8 support in theme and template editors (Bug #12251)</li>
|
||||
<li>[Fix] Allow for posts per page in the MCP to change during topic selection (Bug #12067)</li>
|
||||
|
||||
<li>[Fix] Remove group avatars upon deletion from all profiles, not just the people having the group as default (Bug #12275, #12267)</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -359,7 +359,7 @@ class acp_groups
|
|||
{
|
||||
if (isset($group_row['group_avatar']) && $group_row['group_avatar'])
|
||||
{
|
||||
avatar_delete('group', $group_row);
|
||||
avatar_delete('group', $group_row, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1761,7 +1761,7 @@ function validate_jabber($jid)
|
|||
/**
|
||||
* Remove avatar
|
||||
*/
|
||||
function avatar_delete($mode, $row)
|
||||
function avatar_delete($mode, $row, $clean_db = false)
|
||||
{
|
||||
global $phpbb_root_path, $config, $db, $user;
|
||||
|
||||
|
@ -1774,6 +1774,10 @@ function avatar_delete($mode, $row)
|
|||
}
|
||||
}
|
||||
|
||||
if ($clean_db)
|
||||
{
|
||||
avatar_remove_db($row[$mode . '_avatar']);
|
||||
}
|
||||
$filename = get_avatar_filename($row[$mode . '_avatar']);
|
||||
if (file_exists($phpbb_root_path . $config['avatar_path'] . '/' . $filename))
|
||||
{
|
||||
|
@ -2415,6 +2419,22 @@ function group_correct_avatar($group_id, $old_entry)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Remove avatar also for users not having the group as default
|
||||
*/
|
||||
function avatar_remove_db($avatar_name)
|
||||
{
|
||||
global $config, $db;
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||
SET user_avatar = '',
|
||||
user_avatar_type = 0
|
||||
WHERE user_avatar = '" . $db->sql_escape($avatar_name) . '\'';
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Group Delete
|
||||
*/
|
||||
|
|
|
@ -548,7 +548,7 @@ class ucp_groups
|
|||
{
|
||||
if (isset($group_row['group_avatar']) && $group_row['group_avatar'])
|
||||
{
|
||||
avatar_delete('group', $group_row);
|
||||
avatar_delete('group', $group_row, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue