From e1f03e64dd7f4a98d0823f8073cac08b311f2366 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sun, 10 Nov 2024 00:02:43 +0700 Subject: [PATCH] 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 --- CHANGELOG.md | 2 +- library/ajax/change_tor_status.php | 10 ++--- library/ajax/change_user_opt.php | 2 +- library/ajax/group_membership.php | 5 ++- library/ajax/mod_action.php | 6 +-- library/defines.php | 26 ++++++------ library/includes/cron/cron_run.php | 3 +- library/includes/functions.php | 57 +++++++++++++++----------- library/includes/ucp/register.php | 30 +++++++------- login.php | 2 +- posting.php | 7 ++-- src/Legacy/Atom.php | 2 +- src/Legacy/WordsRate.php | 2 +- styles/js/main.js | 1 - styles/templates/default/tracker.tpl | 4 +- styles/templates/default/viewtopic.tpl | 2 +- 16 files changed, 85 insertions(+), 76 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8aaf2dbac..592977705 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,7 +24,7 @@ - Fixed `md5()` deprecated in PHP 8.4 [\#1561](https://github.com/torrentpier/torrentpier/pull/1561) ([belomaxorka](https://github.com/belomaxorka)) - Increased `USEREMAIL_MAX_LENGTH` [\#1566](https://github.com/torrentpier/torrentpier/pull/1566) ([belomaxorka](https://github.com/belomaxorka)) - Disabled resizing for textarea tag [\#1638](https://github.com/torrentpier/torrentpier/pull/1638) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#1570](https://github.com/torrentpier/torrentpier/pull/1570), [\#1571](https://github.com/torrentpier/torrentpier/pull/1571), [\#1575](https://github.com/torrentpier/torrentpier/pull/1575), [\#1589](https://github.com/torrentpier/torrentpier/pull/1589), [\#1592](https://github.com/torrentpier/torrentpier/pull/1592), [\#1605](https://github.com/torrentpier/torrentpier/pull/1605), [\#1611](https://github.com/torrentpier/torrentpier/pull/1611), [\#1612](https://github.com/torrentpier/torrentpier/pull/1612), [\#1615](https://github.com/torrentpier/torrentpier/pull/1615), [\#1627](https://github.com/torrentpier/torrentpier/pull/1627), [\#1633](https://github.com/torrentpier/torrentpier/pull/1633), [\#1641](https://github.com/torrentpier/torrentpier/pull/1641), [\#1651](https://github.com/torrentpier/torrentpier/pull/1651), [\#1658](https://github.com/torrentpier/torrentpier/pull/1658), [\#1674](https://github.com/torrentpier/torrentpier/pull/1674) ([belomaxorka](https://github.com/belomaxorka)) +- Minor improvements [\#1570](https://github.com/torrentpier/torrentpier/pull/1570), [\#1571](https://github.com/torrentpier/torrentpier/pull/1571), [\#1575](https://github.com/torrentpier/torrentpier/pull/1575), [\#1589](https://github.com/torrentpier/torrentpier/pull/1589), [\#1592](https://github.com/torrentpier/torrentpier/pull/1592), [\#1605](https://github.com/torrentpier/torrentpier/pull/1605), [\#1611](https://github.com/torrentpier/torrentpier/pull/1611), [\#1612](https://github.com/torrentpier/torrentpier/pull/1612), [\#1615](https://github.com/torrentpier/torrentpier/pull/1615), [\#1627](https://github.com/torrentpier/torrentpier/pull/1627), [\#1633](https://github.com/torrentpier/torrentpier/pull/1633), [\#1641](https://github.com/torrentpier/torrentpier/pull/1641), [\#1651](https://github.com/torrentpier/torrentpier/pull/1651), [\#1658](https://github.com/torrentpier/torrentpier/pull/1658), [\#1674](https://github.com/torrentpier/torrentpier/pull/1674), [\#1675](https://github.com/torrentpier/torrentpier/pull/1675) ([belomaxorka](https://github.com/belomaxorka)) - Updated `modern-normalize` to `v3.0.1` [\#1669](https://github.com/torrentpier/torrentpier/pull/1669) ([belomaxorka](https://github.com/belomaxorka)) - Updated deps [\#1563](https://github.com/torrentpier/torrentpier/pull/1563), [\#1564](https://github.com/torrentpier/torrentpier/pull/1564), [\#1608](https://github.com/torrentpier/torrentpier/pull/1608), [\#1609](https://github.com/torrentpier/torrentpier/pull/1609), [\#1610](https://github.com/torrentpier/torrentpier/pull/1610), [\#1637](https://github.com/torrentpier/torrentpier/pull/1637), [\#1646](https://github.com/torrentpier/torrentpier/pull/1646), [\#1647](https://github.com/torrentpier/torrentpier/pull/1647), [\#1650](https://github.com/torrentpier/torrentpier/pull/1650), [\#1656](https://github.com/torrentpier/torrentpier/pull/1656) ([belomaxorka](https://github.com/belomaxorka)) - New Crowdin updates [\#1569](https://github.com/torrentpier/torrentpier/pull/1569), [\#1572](https://github.com/torrentpier/torrentpier/pull/1572), [\#1573](https://github.com/torrentpier/torrentpier/pull/1573), [\#1574](https://github.com/torrentpier/torrentpier/pull/1574), [\#1588](https://github.com/torrentpier/torrentpier/pull/1588), [\#1590](https://github.com/torrentpier/torrentpier/pull/1590), [\#1600](https://github.com/torrentpier/torrentpier/pull/1600), [\#1601](https://github.com/torrentpier/torrentpier/pull/1601), [\#1606](https://github.com/torrentpier/torrentpier/pull/1606), [\#1607](https://github.com/torrentpier/torrentpier/pull/1607), [\#1625](https://github.com/torrentpier/torrentpier/pull/1625), [\#1626](https://github.com/torrentpier/torrentpier/pull/1626), [\#1629](https://github.com/torrentpier/torrentpier/pull/1629), [\#1630](https://github.com/torrentpier/torrentpier/pull/1630), [\#1631](https://github.com/torrentpier/torrentpier/pull/1631), [\#1632](https://github.com/torrentpier/torrentpier/pull/1632), [\#1639](https://github.com/torrentpier/torrentpier/pull/1639), [\#1640](https://github.com/torrentpier/torrentpier/pull/1640), [\#1654](https://github.com/torrentpier/torrentpier/pull/1654), [\#1655](https://github.com/torrentpier/torrentpier/pull/1655) ([Exileum](https://github.com/Exileum)) diff --git a/library/ajax/change_tor_status.php b/library/ajax/change_tor_status.php index b90cf476b..f1e5f96ce 100644 --- a/library/ajax/change_tor_status.php +++ b/library/ajax/change_tor_status.php @@ -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"; diff --git a/library/ajax/change_user_opt.php b/library/ajax/change_user_opt.php index 2f1eebc62..3f6ff1730 100644 --- a/library/ajax/change_user_opt.php +++ b/library/ajax/change_user_opt.php @@ -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']; diff --git a/library/ajax/group_membership.php b/library/ajax/group_membership.php index 8cf70eefa..0fae95ed9 100644 --- a/library/ajax/group_membership.php +++ b/library/ajax/group_membership.php @@ -42,13 +42,14 @@ switch ($mode) { $link = '' . htmlCHR($row['group_name']) . ''; $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 = '' . htmlCHR($row['group_name']) . ''; $html[] = $link; diff --git a/library/ajax/mod_action.php b/library/ajax/mod_action.php index 3b2b4fff6..2612f2414 100644 --- a/library/ajax/mod_action.php +++ b/library/ajax/mod_action.php @@ -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); } diff --git a/library/defines.php b/library/defines.php index 48c2d18ca..6ce03f434 100644 --- a/library/defines.php +++ b/library/defines.php @@ -91,19 +91,19 @@ define('BB_BT_USERS', 'bb_bt_users'); define('BT_AUTH_KEY_LENGTH', 20); // Passkey length // Torrents (reserved: -1) -define('TOR_NOT_APPROVED', 0); // не проверено -define('TOR_CLOSED', 1); // закрыто -define('TOR_APPROVED', 2); // проверено -define('TOR_NEED_EDIT', 3); // недооформлено -define('TOR_NO_DESC', 4); // неоформлено -define('TOR_DUP', 5); // повтор -define('TOR_CLOSED_CPHOLD', 6); // закрыто правообладателем -define('TOR_CONSUMED', 7); // поглощено -define('TOR_DOUBTFUL', 8); // сомнительно -define('TOR_CHECKING', 9); // проверяется -define('TOR_TMP', 10); // временная -define('TOR_PREMOD', 11); // премодерация -define('TOR_REPLENISH', 12); // пополняемая +define('TOR_NOT_APPROVED', 0); +define('TOR_CLOSED', 1); +define('TOR_APPROVED', 2); +define('TOR_NEED_EDIT', 3); +define('TOR_NO_DESC', 4); +define('TOR_DUP', 5); +define('TOR_CLOSED_CPHOLD', 6); +define('TOR_CONSUMED', 7); +define('TOR_DOUBTFUL', 8); +define('TOR_CHECKING', 9); +define('TOR_TMP', 10); +define('TOR_PREMOD', 11); +define('TOR_REPLENISH', 12); // Torrent types (Gold / Silver) define('TOR_TYPE_GOLD', 1); diff --git a/library/includes/cron/cron_run.php b/library/includes/cron/cron_run.php index e3ff75649..146c8343e 100644 --- a/library/includes/cron/cron_run.php +++ b/library/includes/cron/cron_run.php @@ -116,7 +116,8 @@ foreach ($cron_jobs as $job) { "); if (utime() - TIMESTART > 600) { - return; // чтобы daily скрипты не блокировали надолго interval'ные + // so that daily scripts do not block interval scripts for a long time + return; } } else { $cron_err_msg = "Can not run \"{$job['cron_title']}\" : file \"$job_script\" not found" . LOG_LF; diff --git a/library/includes/functions.php b/library/includes/functions.php index aeb9e04d2..c0ecde3c0 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -179,24 +179,24 @@ $bf['forum_perm'] = [ ]; $bf['user_opt'] = [ -# 'dis_opt_name' => ЗАПРЕТЫ используемые администраторами для пользователей -# 'user_opt_name' => НАСТРОЙКИ используемые пользователями - 'user_viewemail' => 0, // Показывать e-mail - 'dis_sig' => 1, // Запрет на подпись - 'dis_avatar' => 2, // Запрет на аватар - 'dis_pm' => 3, // Запрет на отправку ЛС - 'user_viewonline' => 4, // Скрывать пребывание пользователя - 'user_notify' => 5, // Сообщать об ответах в отслеживаемых темах - 'user_notify_pm' => 6, // Сообщать о новых ЛС - 'dis_passkey' => 7, // Запрет на добавление passkey, он же запрет на скачивание торрентов - 'user_porn_forums' => 8, // Скрывать контент 18+ - 'user_callseed' => 9, // Позвать скачавших - 'user_empty' => 10, // Запрет на показ рекламы (не используется) - 'dis_topic' => 11, // Запрет на создание новых тем - 'dis_post' => 12, // Запрет на отправку сообщений - 'dis_post_edit' => 13, // Запрет на редактирование сообщений - 'user_dls' => 14, // Скрывать список текущих закачек в профиле - 'user_retracker' => 15, // Добавлять ретрекер к скачиваемым торрентам +# 'dis_opt_name' => PROHIBITIONS used by administrators for users +# 'user_opt_name' => SETTINGS used by users + 'user_viewemail' => 0, // [SETTINGS] Show my email for other users + 'dis_sig' => 1, // [PROHIBITIONS] Block set signature + 'dis_avatar' => 2, // [PROHIBITIONS] Block set avatar + 'dis_pm' => 3, // [PROHIBITIONS] Block sending PMs + 'user_viewonline' => 4, // [SETTINGS] Hide my online status (time of last activity) + 'user_notify' => 5, // [SETTINGS] Report of replies in my "Watching topics" (Via email) + 'user_notify_pm' => 6, // [SETTINGS] Report of new PMs in forum (Via email) + 'dis_passkey' => 7, // [PROHIBITIONS] Block changing and adding passkey into torrents, also block downloading torrents + 'user_porn_forums' => 8, // [SETTINGS] Hide 18+ content (Porn forums) + 'user_callseed' => 9, // [SETTINGS] Allow to send "Callseed" PMs + 'user_empty' => 10, // [SETTINGS] Block showing advertisements to me (Not used) + 'dis_topic' => 11, // [PROHIBITIONS] Block to create new topics + 'dis_post' => 12, // [PROHIBITIONS] Block to send replies in topics + 'dis_post_edit' => 13, // [PROHIBITIONS] Block editing own posts / topics + 'user_dls' => 14, // [SETTINGS] Hide list of "Current downloads" in my profile + 'user_retracker' => 15, // [SETTINGS] Add my retracker into downloaded torrent files ]; function bit2dec($bit_num) @@ -546,18 +546,18 @@ function url_arg($url, $arg, $value, $amp = '&') { $arg = preg_quote($arg, '/'); - // разделяем URL и ANCHOR + // separate URL and ANCHOR $anchor = ''; if (preg_match('/(.*)(#.*)/s', $url, $m)) { $url = $m[1]; $anchor = $m[2]; } - // заменяем параметр, если он существует + // replace the parameter if it exists if (preg_match("/((\?|&|&)$arg=)[^&]*/s", $url, $m)) { $cur = $m[0]; $new = null === $value ? '' : $m[1] . urlencode($value); $url = str_replace($cur, $new, $url); - } // добавляем параметр + } // add a parameter elseif (null !== $value) { $div = str_contains($url, '?') ? $amp : '?'; $url = $url . $div . $arg . '=' . urlencode($value); @@ -1667,11 +1667,11 @@ function clean_text_match($text, $ltrim_star = true, $die_if_empty = false) if ($bb_cfg['search_engine_type'] == 'sphinx') { $text = preg_replace('#(?<=\S)\-#u', ' ', $text); // "1-2-3" -> "1 2 3" - $text = preg_replace('#[^0-9a-zA-Zа-яА-ЯёЁ\-_*|]#u', ' ', $text); // допустимые символы (кроме " которые отдельно) - $text = str_replace(['-', '*'], [' -', '* '], $text); // только в начале / конце слова + $text = preg_replace('#[^0-9a-zA-Zа-яА-ЯёЁ\-_*|]#u', ' ', $text); // valid characters (except '"' which are separate) + $text = str_replace(['-', '*'], [' -', '* '], $text); // only at the beginning/end of a word $text = preg_replace('#\s*\|\s*#u', '|', $text); // "| " -> "|" $text = preg_replace('#\|+#u', ' | ', $text); // "||" -> "|" - $text = preg_replace('#(?<=\s)[\-*]+\s#u', ' ', $text); // одиночные " - ", " * " + $text = preg_replace('#(?<=\s)[\-*]+\s#u', ' ', $text); // single " - ", " * " $text = trim($text, ' -|'); $text = str_compact($text); $text_match_sql = ($wrap_with_quotes && $text != '') ? '"' . $text . '"' : $text; @@ -1775,7 +1775,14 @@ function get_title_match_topics($title_match_sql, array $forum_ids = []) return $where_ids; } -// для более корректного поиска по словам содержащим одиночную кавычку +/** + * Encodes text match + * + * Desc: for a more correct search for words containing a single quote + * + * @param $txt + * @return array|string|string[] + */ function encode_text_match($txt) { return str_replace("'", ''', $txt); diff --git a/library/includes/ucp/register.php b/library/includes/ucp/register.php index 7c306af84..f43f15c49 100644 --- a/library/includes/ucp/register.php +++ b/library/includes/ucp/register.php @@ -30,18 +30,18 @@ $can_register = (IS_GUEST || IS_ADMIN); $submit = !empty($_POST['submit']); $errors = []; -$adm_edit = false; // редактирование админом чужого профиля +$adm_edit = false; // editing someone else's profile by an admin require INC_DIR . '/bbcode.php'; -$pr_data = []; // данные редактируемого либо регистрационного профиля -$db_data = []; // данные для базы: регистрационные либо измененные данные юзера -$tp_data = []; // данные для tpl +$pr_data = []; // data of the edited or registration profile +$db_data = []; // data for the database: registration or changed user data +$tp_data = []; // data for tpl -// Данные профиля +// Profile data switch ($mode) { /** - * Регистрация + * Registration */ case 'register': if (!$can_register) { @@ -49,16 +49,16 @@ switch ($mode) { } if (!IS_ADMIN) { - // Ограничение по ip + // IP limit if ($bb_cfg['unique_ip']) { if ($users = DB()->fetch_row("SELECT user_id, username FROM " . BB_USERS . " WHERE user_reg_ip = '" . USER_IP . "' LIMIT 1")) { bb_die(sprintf($lang['ALREADY_REG_IP'], '' . $users['username'] . '', $bb_cfg['tech_admin_email'])); } } - // Отключение регистрации + // Disabling registration if ($bb_cfg['new_user_reg_disabled'] || ($bb_cfg['reg_email_activation'] && !$bb_cfg['emailer']['enabled'])) { bb_die($lang['NEW_USER_REG_DISABLED']); - } // Ограничение по времени + } // Time limit elseif ($bb_cfg['new_user_reg_restricted']) { if (in_array(date('G'), $bb_cfg['new_user_reg_interval'], true)) { bb_die($lang['REGISTERED_IN_TIME']); @@ -91,7 +91,7 @@ switch ($mode) { break; /** - * Редактирование профиля + * Profile editing */ case 'editprofile': if (IS_GUEST) { @@ -103,7 +103,7 @@ switch ($mode) { 'user_active' => IS_ADMIN, 'username' => (IS_ADMIN || $bb_cfg['allow_namechange']) && !IN_DEMO_MODE, 'user_password' => !IN_DEMO_MODE, - 'user_email' => !IN_DEMO_MODE, // должен быть после user_password + 'user_email' => !IN_DEMO_MODE, // should be after user_password 'user_lang' => $bb_cfg['allow_change']['language'], 'user_gender' => $bb_cfg['gender'], 'user_birthday' => $bb_cfg['birthday_enabled'], @@ -121,7 +121,7 @@ switch ($mode) { 'tpl_name' => true ]; - // Выбор профиля: для юзера свой, для админа любой + // Select a profile: your own for the user, any for the admin if (IS_ADMIN && !empty($_REQUEST['u'])) { $pr_user_id = (int)$_REQUEST['u']; $adm_edit = ($pr_user_id != $userdata['user_id']); @@ -160,7 +160,7 @@ if ($submit) { } } -// Валидация данных +// Data validation $cur_pass_valid = $adm_edit; $can_edit_tpl = []; @@ -228,7 +228,7 @@ foreach ($profile_fields as $field => $can_edit) { $new_pass = (string)@$_POST['new_pass']; $cfm_pass = (string)@$_POST['cfm_pass']; - // пароль для гостя и при смене пароля юзером + // password for the guest (while registering) and when the user changes the password if (!empty($new_pass)) { if ($err = \TorrentPier\Validate::password($new_pass, $cfm_pass)) { $errors[] = $err; @@ -653,7 +653,7 @@ if ($submit && !$errors) { else { set_pr_die_append_msg($pr_data['user_id']); - // если что-то было изменено + // if anything has been changed if ($db_data) { if (!$pr_data['user_active']) { $user_actkey = make_rand_str(ACTKEY_LENGTH); diff --git a/login.php b/login.php index aea8f6333..ae503b3be 100644 --- a/login.php +++ b/login.php @@ -87,7 +87,7 @@ if (isset($_POST['login'])) { if (!$login_errors) { if ($user->login($_POST, $mod_admin_login)) { $redirect_url = (defined('FIRST_LOGON')) ? $bb_cfg['first_logon_redirect_url'] : $redirect_url; - // Обнуление при введении правильно комбинации логин/пароль + // Reset when entering the correct login/password combination CACHE('bb_login_err')->rm('l_err_' . USER_IP); if ($redirect_url == '/' . LOGIN_URL || $redirect_url == LOGIN_URL) { diff --git a/posting.php b/posting.php index e2aa84feb..adb1258c8 100644 --- a/posting.php +++ b/posting.php @@ -268,7 +268,8 @@ $update_post_time = !empty($_POST['update_post_time']); execute_posting_attachment_handling(); -// если за время пока вы писали ответ, в топике появились новые сообщения, перед тем как ваше сообщение будет отправлено, выводится предупреждение с обзором этих сообщений +// If while you were writing a response, new messages appeared in the topic, +// before your message is sent, a warning is displayed with an overview of these messages $topic_has_new_posts = false; if (!IS_GUEST && $mode != 'newtopic' && ($submit || $preview || $mode == 'quote' || $mode == 'reply') && isset($_COOKIE[COOKIE_TOPIC])) { @@ -376,7 +377,7 @@ if (($delete || $mode == 'delete') && !$confirm) { if (defined('TORRENT_ATTACH_ID') && $bb_cfg['bt_newtopic_auto_reg'] && !$error_msg) { if (!DB()->fetch_row("SELECT attach_id FROM " . BB_BT_TORRENTS . " WHERE attach_id = " . TORRENT_ATTACH_ID)) { if ($bb_cfg['premod']) { - // Получение списка id форумов начиная с parent + // Getting a list of forum ids starting with "parent" $forum_parent = $forum_id; if ($post_info['forum_parent']) { $forum_parent = $post_info['forum_parent']; @@ -390,7 +391,7 @@ if (($delete || $mode == 'delete') && !$confirm) { } $sub_forums[] = $forum_id; $sub_forums = implode(',', $sub_forums); - // Подсчет проверенных релизов в форумах раздела + // Counting verified releases in section forums $count_checked_releases = DB()->fetch_row(" SELECT COUNT(*) AS checked_releases FROM " . BB_BT_TORRENTS . " diff --git a/src/Legacy/Atom.php b/src/Legacy/Atom.php index 536509b80..0cfab704e 100644 --- a/src/Legacy/Atom.php +++ b/src/Legacy/Atom.php @@ -212,7 +212,7 @@ class Atom $date = bb_date($last_time, 'Y-m-d', 0); $time = bb_date($last_time, 'H:i:s', 0); $updated = ''; - $checktime = TIMENOW - 604800; // неделя (week) + $checktime = TIMENOW - 604800; // 1 week if ($topic['topic_first_post_edit_time'] && $topic['topic_first_post_edit_time'] > $checktime) { $updated = '[' . $lang['ATOM_UPDATED'] . '] '; } diff --git a/src/Legacy/WordsRate.php b/src/Legacy/WordsRate.php index 039d2eaf4..aeaaf2954 100644 --- a/src/Legacy/WordsRate.php +++ b/src/Legacy/WordsRate.php @@ -41,7 +41,7 @@ class WordsRate */ public function get_words_rate($text) { - $this->words_rate = 127; // максимальное значение по умолчанию + $this->words_rate = 127; // maximum value by default $this->deleted_words = []; $this->del_text_hl = $text; diff --git a/styles/js/main.js b/styles/js/main.js index ffda32b17..eb1d25da2 100644 --- a/styles/js/main.js +++ b/styles/js/main.js @@ -494,7 +494,6 @@ $(document).ready(function () { autocomplete(); }); - // перемещение окна var _X, _Y; var _bMoveble = false; diff --git a/styles/templates/default/tracker.tpl b/styles/templates/default/tracker.tpl index ba2d72401..f864e5042 100644 --- a/styles/templates/default/tracker.tpl +++ b/styles/templates/default/tracker.tpl @@ -468,7 +468,7 @@ ajax.callback.view_post = function(data) {