mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Small refactoring for avatar ajax (#612)
* Small refactoring for avatar.php [AJAX] * Small fixes
This commit is contained in:
parent
d68c37eacd
commit
7bbeff0141
1 changed files with 1 additions and 2 deletions
|
@ -24,13 +24,12 @@ if (!IS_ADMIN && $user_id != $user->id) {
|
|||
$this->ajax_die($lang['NOT_ADMIN']);
|
||||
}
|
||||
|
||||
$new_ext_id = null;
|
||||
$new_ext_id = 0;
|
||||
$response = '';
|
||||
|
||||
switch ($mode) {
|
||||
case 'delete':
|
||||
delete_avatar($user_id, $u_data['avatar_ext_id']);
|
||||
$new_ext_id = 0;
|
||||
$response = get_avatar($user_id, $new_ext_id);
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue