mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Updated
This commit is contained in:
parent
efc0e83948
commit
c42225beaa
@ -9,7 +9,7 @@ $user_id = (int) $this->request['user_id'];
|
||||
|
||||
if (!$user_id OR !$u_data = get_userdata($user_id))
|
||||
{
|
||||
$this->ajax_die('Invalid user_id');
|
||||
$this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
|
||||
}
|
||||
|
||||
if (!IS_ADMIN && $user_id != $user->id)
|
||||
@ -32,4 +32,4 @@ DB()->query("UPDATE ". BB_USERS ." SET avatar_ext_id = $new_ext_id WHERE user_id
|
||||
|
||||
cache_rm_user_sessions($user_id);
|
||||
|
||||
$this->response['avatar_html'] = $response;
|
||||
$this->response['avatar_html'] = $response;
|
||||
|
@ -9,7 +9,7 @@ $new_opt = Zend\Json\Json::decode($this->request['user_opt'], Zend\Json\Json::TY
|
||||
|
||||
if (!$user_id OR !$u_data = get_userdata($user_id))
|
||||
{
|
||||
$this->ajax_die('invalid user_id');
|
||||
$this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
|
||||
}
|
||||
|
||||
if (!is_array($new_opt))
|
||||
@ -30,4 +30,4 @@ DB()->query("UPDATE ". BB_USERS ." SET user_opt = {$u_data['user_opt']} WHERE us
|
||||
// Удаляем данные из кеша
|
||||
cache_rm_user_sessions ($user_id);
|
||||
|
||||
$this->response['resp_html'] = $lang['SAVED'];
|
||||
$this->response['resp_html'] = $lang['SAVED'];
|
||||
|
@ -9,7 +9,7 @@ $rank_id = intval($this->request['rank_id']);
|
||||
|
||||
if (!$user_id = intval($this->request['user_id']) OR !$profiledata = get_userdata($user_id))
|
||||
{
|
||||
$this->ajax_die("invalid user_id: $user_id");
|
||||
$this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
|
||||
}
|
||||
|
||||
if ($rank_id != 0 && !isset($ranks[$rank_id]))
|
||||
|
@ -6,7 +6,7 @@ global $lang, $user;
|
||||
|
||||
if (!$user_id = intval($this->request['user_id']) OR !$profiledata = get_userdata($user_id))
|
||||
{
|
||||
$this->ajax_die("invalid user_id: $user_id");
|
||||
$this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
|
||||
}
|
||||
|
||||
if (!$mode = (string) $this->request['mode'])
|
||||
@ -66,4 +66,4 @@ switch ($mode)
|
||||
|
||||
default:
|
||||
$this->ajax_die("invalid mode: $mode");
|
||||
}
|
||||
}
|
||||
|
@ -4,8 +4,15 @@ if (!defined('IN_AJAX')) die(basename(__FILE__));
|
||||
|
||||
global $userdata, $lang, $bb_cfg;
|
||||
|
||||
$mode = (string) $this->request['mode'];
|
||||
$user_id = $this->request['user_id'];
|
||||
if (!$user_id = $this->request['user_id'])
|
||||
{
|
||||
$this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
|
||||
}
|
||||
|
||||
if (!$mode = (string) $this->request['mode'])
|
||||
{
|
||||
$this->ajax_die('invalid mode (empty)');
|
||||
}
|
||||
|
||||
switch ($mode)
|
||||
{
|
||||
@ -85,4 +92,4 @@ switch ($mode)
|
||||
}
|
||||
|
||||
$this->response['mode'] = $mode;
|
||||
$this->response['url'] = html_entity_decode(make_url('/') . PROFILE_URL . $user_id);
|
||||
$this->response['url'] = html_entity_decode(make_url('/') . PROFILE_URL . $user_id);
|
||||
|
Loading…
Reference in New Issue
Block a user