mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
parent
64df3c5538
commit
21c8e7d48a
58 changed files with 226 additions and 228 deletions
|
@ -30,9 +30,9 @@ if (!defined('IN_AJAX')) {
|
|||
global $datastore, $lang;
|
||||
|
||||
$ranks = $datastore->get('ranks');
|
||||
$rank_id = intval($this->request['rank_id']);
|
||||
$rank_id = (int)$this->request['rank_id'];
|
||||
|
||||
if (!$user_id = intval($this->request['user_id']) or !$profiledata = get_userdata($user_id)) {
|
||||
if (!$user_id = (int)$this->request['user_id'] or !$profiledata = get_userdata($user_id)) {
|
||||
$this->ajax_die("invalid user_id: $user_id");
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ if (!defined('IN_AJAX')) {
|
|||
|
||||
global $bb_cfg, $userdata, $lang;
|
||||
|
||||
if (!$group_id = intval($this->request['group_id']) or !$group_info = get_group_data($group_id)) {
|
||||
if (!$group_id = (int)$this->request['group_id'] or !$group_info = get_group_data($group_id)) {
|
||||
$this->ajax_die($lang['NO_GROUP_ID_SPECIFIED']);
|
||||
}
|
||||
if (!$mode = (string)$this->request['mode']) {
|
||||
|
|
|
@ -29,7 +29,7 @@ if (!defined('IN_AJAX')) {
|
|||
|
||||
global $bb_cfg, $lang;
|
||||
|
||||
if (!$user_id = intval($this->request['user_id']) or !$profiledata = get_userdata($user_id)) {
|
||||
if (!$user_id = (int)$this->request['user_id'] or !$profiledata = get_userdata($user_id)) {
|
||||
$this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
|
||||
}
|
||||
if (!$field = (string)$this->request['field']) {
|
||||
|
|
|
@ -29,7 +29,7 @@ if (!defined('IN_AJAX')) {
|
|||
|
||||
global $lang, $user;
|
||||
|
||||
if (!$user_id = intval($this->request['user_id']) or !$profiledata = get_userdata($user_id)) {
|
||||
if (!$user_id = (int)$this->request['user_id'] or !$profiledata = get_userdata($user_id)) {
|
||||
$this->ajax_die("invalid user_id: $user_id");
|
||||
}
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ switch ($mode) {
|
|||
$this->response['val']['tpl-last-edit-tst'] = $tpl_data['tpl_last_edit_tm'];
|
||||
$this->response['html']['tpl-name-old-save'] = $tpl_data['tpl_name'];
|
||||
$this->response['html']['tpl-last-edit-time'] = bb_date($tpl_data['tpl_last_edit_tm'], 'd-M-y H:i');
|
||||
$this->response['html']['tpl-last-edit-by'] = get_username(intval($tpl_data['tpl_last_edit_by']));
|
||||
$this->response['html']['tpl-last-edit-by'] = get_username((int)$tpl_data['tpl_last_edit_by']);
|
||||
|
||||
$this->response['tpl_rules_href'] = POST_URL . $tpl_data['tpl_rules_post_id'] . '#' . $tpl_data['tpl_rules_post_id'];
|
||||
break;
|
||||
|
@ -137,7 +137,7 @@ switch ($mode) {
|
|||
// сохранение изменений
|
||||
case 'save':
|
||||
if ($tpl_data['tpl_last_edit_tm'] > $this->request['tpl_l_ed_tst'] && $tpl_data['tpl_last_edit_by'] != $userdata['user_id']) {
|
||||
$last_edit_by_username = get_username(intval($tpl_data['tpl_last_edit_by']));
|
||||
$last_edit_by_username = get_username((int)$tpl_data['tpl_last_edit_by']);
|
||||
$msg = "Изменения не были сохранены!\n\n";
|
||||
$msg .= 'Шаблон был отредактирован: ' . html_entity_decode($last_edit_by_username) . ', ' . delta_time($tpl_data['tpl_last_edit_tm']) . " назад\n\n";
|
||||
$this->ajax_die($msg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue