mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Minor improvements (#1675)
* Minor improvements * Update * Updated * Update * Updated * Update viewtopic.tpl * Update functions.php * Update functions.php * Update functions.php * Update functions.php * Update functions.php * Update functions.php * Update functions.php * Update functions.php * Update functions.php * Update CHANGELOG.md
This commit is contained in:
parent
c5b3d63221
commit
e1f03e64dd
16 changed files with 85 additions and 76 deletions
|
@ -44,7 +44,7 @@ switch ($mode) {
|
|||
case 'status':
|
||||
$new_status = (int)$this->request['status'];
|
||||
|
||||
// Валидность статуса
|
||||
// Check status validity
|
||||
if (!isset($lang['TOR_STATUS_NAME'][$new_status])) {
|
||||
$this->ajax_die($lang['TOR_STATUS_FAILED']);
|
||||
}
|
||||
|
@ -55,17 +55,17 @@ switch ($mode) {
|
|||
$this->ajax_die($lang['NOT_MODERATOR']);
|
||||
}
|
||||
|
||||
// Тот же статус
|
||||
// Error if same status
|
||||
if ($tor['tor_status'] == $new_status) {
|
||||
$this->ajax_die($lang['TOR_STATUS_DUB']);
|
||||
}
|
||||
|
||||
// Запрет на изменение/присвоение CH-статуса модератором
|
||||
// Prohibition on changing/assigning CH-status by moderator
|
||||
if ($new_status == TOR_CLOSED_CPHOLD && !IS_ADMIN) {
|
||||
$this->ajax_die($lang['TOR_DONT_CHANGE']);
|
||||
}
|
||||
|
||||
// Права на изменение статуса
|
||||
// Check rights to change status
|
||||
if ($tor['tor_status'] == TOR_CLOSED_CPHOLD) {
|
||||
if (!IS_ADMIN) {
|
||||
$this->verify_mod_rights($tor['forum_id']);
|
||||
|
@ -75,7 +75,7 @@ switch ($mode) {
|
|||
$this->verify_mod_rights($tor['forum_id']);
|
||||
}
|
||||
|
||||
// Подтверждение изменения статуса, выставленного другим модератором
|
||||
// Confirmation of status change set by another moderator
|
||||
if ($tor['tor_status'] != TOR_NOT_APPROVED && $tor['checked_user_id'] != $userdata['user_id'] && $tor['checked_time'] + 2 * 3600 > TIMENOW) {
|
||||
if (empty($this->request['confirmed'])) {
|
||||
$msg = $lang['TOR_STATUS_OF'] . " {$lang['TOR_STATUS_NAME'][$tor['tor_status']]}\n\n";
|
||||
|
|
|
@ -32,7 +32,7 @@ foreach ($bf['user_opt'] as $opt_name => $opt_bit) {
|
|||
|
||||
DB()->query("UPDATE " . BB_USERS . " SET user_opt = {$u_data['user_opt']} WHERE user_id = $user_id LIMIT 1");
|
||||
|
||||
// Удаляем данные из кеша
|
||||
// Remove data from cache
|
||||
\TorrentPier\Sessions::cache_rm_user_sessions($user_id);
|
||||
|
||||
$this->response['resp_html'] = $lang['SAVED'];
|
||||
|
|
|
@ -42,13 +42,14 @@ switch ($mode) {
|
|||
$link = '<a href="' . $href . '" class="' . $class . '" target="_blank">' . htmlCHR($row['group_name']) . '</a>';
|
||||
$html[] = $link;
|
||||
} else {
|
||||
// скрытая группа и сам юзер не является ее членом
|
||||
// hidden group and the user himself is not a member of it
|
||||
if ($row['group_type'] == GROUP_HIDDEN && !$row['can_view']) {
|
||||
continue;
|
||||
}
|
||||
if ($row['group_moderator'] == $user->id) {
|
||||
// the user himself is the moderator of this group
|
||||
$class .= ' selfMod';
|
||||
$href .= "&" . POST_USERS_URL . "=$user_id"; // сам юзер модератор этой группы
|
||||
$href .= "&" . POST_USERS_URL . "=$user_id";
|
||||
}
|
||||
$link = '<a href="' . $href . '" class="' . $class . '" target="_blank">' . htmlCHR($row['group_name']) . '</a>';
|
||||
$html[] = $link;
|
||||
|
|
|
@ -22,7 +22,7 @@ switch ($mode) {
|
|||
$topics = (string)$this->request['topic_ids'];
|
||||
$status = (int)$this->request['status'];
|
||||
|
||||
// Валидность статуса
|
||||
// Check status validity
|
||||
if (!isset($lang['TOR_STATUS_NAME'][$status])) {
|
||||
$this->ajax_die($lang['TOR_STATUS_FAILED']);
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ switch ($mode) {
|
|||
|
||||
DB()->query("UPDATE " . BB_TOPICS . " SET topic_title = '$topic_title_sql' WHERE topic_id = $topic_id LIMIT 1");
|
||||
|
||||
// Обновление кеша новостей на главной
|
||||
// Update the news cache on the index page
|
||||
$news_forums = array_flip(explode(',', $bb_cfg['latest_news_forum_id']));
|
||||
if (isset($news_forums[$t_data['forum_id']]) && $bb_cfg['show_latest_news']) {
|
||||
$datastore->enqueue([
|
||||
|
@ -151,5 +151,5 @@ switch ($mode) {
|
|||
break;
|
||||
|
||||
default:
|
||||
$this->ajax_die('Invalid mode');
|
||||
$this->ajax_die('Invalid mode: ' . $mode);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue