diff --git a/library/config.php b/library/config.php
index 3dd94976e..f55801576 100644
--- a/library/config.php
+++ b/library/config.php
@@ -733,13 +733,8 @@ $bb_cfg['tor_frozen_author_download'] = [
TOR_PREMOD => true,
];
-// Disallowed for changing the title
-$bb_cfg['tor_cannot_edit'] = [
- TOR_CHECKING => true,
- TOR_CLOSED => true,
- TOR_CONSUMED => true,
- TOR_DUP => true,
-];
+// Disallowed release editing with a certain status
+$bb_cfg['tor_cannot_edit'] = [TOR_CHECKING, TOR_CLOSED, TOR_CONSUMED, TOR_DUP];
// Disallowed for creating new releases if status is not fully formatted/unformatted/suspicious
$bb_cfg['tor_cannot_new'] = [TOR_NEED_EDIT, TOR_NO_DESC, TOR_DOUBTFUL];
diff --git a/posting.php b/posting.php
index feced59fb..3b979886e 100644
--- a/posting.php
+++ b/posting.php
@@ -327,10 +327,10 @@ if (($delete || $mode == 'delete') && !$confirm) {
$attach_rg_sig = (isset($_POST['attach_rg_sig'], $_POST['poster_rg']) && $_POST['poster_rg'] != -1) ? 1 : 0;
$poster_rg_id = (isset($_POST['poster_rg']) && $_POST['poster_rg'] != -1) ? (int)$_POST['poster_rg'] : 0;
- // Disable edit release if tor_status in $bb_cfg['tor_cannot_edit']
+ // Disallowed release editing with a certain status
if (!empty($bb_cfg['tor_cannot_edit']) && $post_info['allow_reg_tracker'] && $post_data['first_post'] && !IS_AM) {
- if ($tor_status = DB()->fetch_row("SELECT tor_status FROM " . BB_BT_TORRENTS . " WHERE topic_id = $topic_id AND forum_id = $forum_id AND tor_status IN(" . implode(',', array_keys($bb_cfg['tor_cannot_edit'])) . ") LIMIT 1")) {
- bb_die('Вы не можете редактировать релиз, если он имеет статус: ' . '' . $bb_cfg['tor_icons'][$tor_status['tor_status']] . ' ' . $lang['TOR_STATUS_NAME'][$tor_status['tor_status']] . '.');
+ if ($tor_status = DB()->fetch_row("SELECT tor_status FROM " . BB_BT_TORRENTS . " WHERE topic_id = $topic_id AND forum_id = $forum_id AND tor_status IN(" . implode(',', $bb_cfg['tor_cannot_edit']) . ") LIMIT 1")) {
+ bb_die($lang['NOT_EDIT_TOR_STATUS'] . ': ' . $bb_cfg['tor_icons'][$tor_status['tor_status']] . ' ' . $lang['TOR_STATUS_NAME'][$tor_status['tor_status']] . '.');
}
}