diff --git a/library/ajax/change_tor_status.php b/library/ajax/change_tor_status.php index 37faae0a4..03da8b89f 100644 --- a/library/ajax/change_tor_status.php +++ b/library/ajax/change_tor_status.php @@ -52,7 +52,7 @@ switch ($mode) if ($tor['tor_status'] == TOR_CLOSED_CPHOLD) { if (!IS_ADMIN) $this->verify_mod_rights($tor['forum_id']); - DB()->query("UPDATE ". BB_TOPICS ." SET topic_status = ". TOPIC_UNLOCKED ." WHERE topic_id = {$tor['topic_id']} LIMIT 1"); + DB()->query("UPDATE ". BB_TOPICS ." SET topic_status = ". TOPIC_UNLOCKED ." WHERE topic_id = {$topic_id} LIMIT 1"); } else { @@ -80,7 +80,7 @@ switch ($mode) if ($tor['poster_id'] > 0) { $subject = sprintf($lang['TOR_MOD_TITLE'], $tor['topic_title']); - $message = sprintf($lang['TOR_MOD_MSG'], get_username($tor['poster_id']), make_url(TOPIC_URL . $tor['topic_id']), $bb_cfg['tor_icons'][$new_status] .' '.$lang['TOR_STATUS_NAME'][$new_status]); + $message = sprintf($lang['TOR_MOD_MSG'], get_username($tor['poster_id']), make_url(TOPIC_URL . $topic_id), $bb_cfg['tor_icons'][$new_status] .' '.$lang['TOR_STATUS_NAME'][$new_status]); if ($comment && $comment != $lang['COMMENT']) $message .= "\n\n[b]". $lang['COMMENT'] .'[/b]: '. $comment; @@ -94,7 +94,7 @@ switch ($mode) if (!$bb_cfg['tor_comment']) $this->ajax_die($lang['MODULE_OFF']); $subject = sprintf($lang['TOR_AUTH_TITLE'], $tor['topic_title']); - $message = sprintf($lang['TOR_AUTH_MSG'], get_username($tor['checked_user_id']), make_url(TOPIC_URL . $tor['topic_id']), $tor['topic_title']); + $message = sprintf($lang['TOR_AUTH_MSG'], get_username($tor['checked_user_id']), make_url(TOPIC_URL . $topic_id), $tor['topic_title']); if ($comment && $comment != $lang['COMMENT']) $message .= "\n\n[b]". $lang['COMMENT'] .'[/b]: '. $comment; diff --git a/library/ajax/view_torrent.php b/library/ajax/view_torrent.php index 7931eb625..fe999c402 100644 --- a/library/ajax/view_torrent.php +++ b/library/ajax/view_torrent.php @@ -4,7 +4,7 @@ if (!defined('IN_AJAX')) die(basename(__FILE__)); global $lang; -if (!isset($this->request['attach_id'])) +if (!isset($this->request['t'])) { $this->ajax_die($lang['EMPTY_ATTACH_ID']); } diff --git a/library/includes/functions_admin.php b/library/includes/functions_admin.php index c45216005..d986c9643 100644 --- a/library/includes/functions_admin.php +++ b/library/includes/functions_admin.php @@ -302,9 +302,9 @@ function topic_delete ($mode_or_topic_id, $forum_id = null, $prune_time = 0, $pr LEFT JOIN ". BB_POLL_USERS ." pu USING(topic_id) "); - // Delete posts, posts_text, attachments (from DB) + // Delete posts, posts_text DB()->query(" - DELETE p, pt, ps, a, d, ph + DELETE p, pt, ph, ps FROM ". $tmp_delete_topics ." del LEFT JOIN ". BB_POSTS ." p ON(p.topic_id = del.topic_id) LEFT JOIN ". BB_POSTS_TEXT ." pt ON(pt.post_id = p.post_id) @@ -665,13 +665,12 @@ function post_delete ($mode_or_post_id, $user_id = null, $exclude_first = true) // Delete posts, posts_text DB()->query(" - DELETE p, pt, ps, tor, ph + DELETE p, pt, ph, ps FROM ". $tmp_delete_posts ." del LEFT JOIN ". BB_POSTS ." p ON(p.post_id = del.post_id) LEFT JOIN ". BB_POSTS_TEXT ." pt ON(pt.post_id = del.post_id) LEFT JOIN ". BB_POSTS_HTML ." ph ON(ph.post_id = del.post_id) LEFT JOIN ". BB_POSTS_SEARCH ." ps ON(ps.post_id = del.post_id) - LEFT JOIN ". BB_BT_TORRENTS ." tor ON(tor.topic_id = del.topic_id) "); // Log action diff --git a/library/includes/functions_torrent.php b/library/includes/functions_torrent.php index e5a79c5db..857eef080 100644 --- a/library/includes/functions_torrent.php +++ b/library/includes/functions_torrent.php @@ -66,7 +66,7 @@ function tracker_unregister ($topic_id, $redirect_url = '') // Unset DL-type for topic if ($bb_cfg['bt_unset_dltype_on_tor_unreg'] && $topic_id) { - DB()->query("UPDATE ". BB_TOPICS ." SET topic_dl_type = 0 WHERE topic_id = $topic_id LIMIT 1"); + DB()->query("UPDATE ". BB_TOPICS ." SET tracker_status = 0 WHERE topic_id = $topic_id LIMIT 1"); } // Ocelot @@ -258,7 +258,7 @@ function delete_torrent ($topic_id) function change_tor_status ($topic_id, $tor_status) { - global $topic_id, $userdata; + global $userdata; $tor_status = (int) $tor_status; diff --git a/library/includes/viewtopic_torrent.php b/library/includes/viewtopic_torrent.php index 799b7ac4c..3e0c54f04 100644 --- a/library/includes/viewtopic_torrent.php +++ b/library/includes/viewtopic_torrent.php @@ -76,7 +76,7 @@ else if ($tor_reged && !$tor_info) { DB()->query("UPDATE ". BB_TOPICS ." SET tracker_status = 0 WHERE topic_id = $topic_id LIMIT 1"); - bb_die('Torrent status fixed'); //TODO: локализация + bb_die('Torrent status fixed'); // TODO: локализация } if ($tor_reged) @@ -155,11 +155,8 @@ if ($tor_reged) 'FILESIZE' => $tor_file_size, 'MAGNET' => $tor_magnet, 'HASH' => strtoupper(bin2hex($tor_info['info_hash'])), - 'DOWNLOAD_COUNT' => sprintf($lang['DOWNLOAD_NUMBER'], 666/*$download_count*/), + 'DOWNLOAD_COUNT' => sprintf($lang['DOWNLOAD_NUMBER'], 666/*$download_count*/), // TODO: подсчет числа скачиваний вложения (?) или удалить 'REGED_TIME' => bb_date($tor_info['reg_time']), - 'REGED_DELTA' => delta_time($tor_info['reg_time']), - 'TORRENT_SIZE' => humn_size($tor_size), - 'COMPLETED' => sprintf($lang['DOWNLOAD_NUMBER'], $tor_info['complete_count']), 'SHOW_TOR_REGGED' => true, 'TRACKER_REG_LINK' => $tr_reg_link, diff --git a/styles/templates/default/viewtopic_attach.tpl b/styles/templates/default/viewtopic_attach.tpl deleted file mode 100644 index 11da562d9..000000000 --- a/styles/templates/default/viewtopic_attach.tpl +++ /dev/null @@ -1,304 +0,0 @@ -
- - - -{postrow.attach.tor_not_reged.DOWNLOAD_NAME} | -||
---|---|---|
{L_TORRENT}: | -{postrow.attach.tor_not_reged.TRACKER_LINK} | -
- {postrow.attach.tor_not_reged.S_UPLOAD_IMAGE} -{L_DOWNLOAD} -{postrow.attach.tor_not_reged.FILESIZE} - |
-
{L_ADDED}: | -{postrow.attach.tor_not_reged.POSTED_TIME} | -|
{L_DOWNLOADED}: | -{postrow.attach.tor_not_reged.DOWNLOAD_COUNT} [ {L_SHOW_DL_LIST} ] | -|
{postrow.attach.tor_not_reged.comment.COMMENT} | -||
- - - - - - - - | -
{TOR_BLOCKED_MSG} |
{RATIO_WARN_MSG} |
{postrow.attach.tor_reged.DOWNLOAD_NAME} {postrow.attach.tor_reged.MAGNET} | -||
---|---|---|
![]() ![]() |
- ||
![]() ![]() |
- ||
{L_TORRENT}: | -- {postrow.attach.tor_reged.TRACKER_LINK} - [ {postrow.attach.tor_reged.REGED_TIME} ] - · {postrow.attach.tor_reged.HASH} - | -
-
- {postrow.attach.tor_reged.S_UPLOAD_IMAGE} {L_DOWNLOAD} - - -{postrow.attach.tor_reged.S_UPLOAD_IMAGE} {L_DOWNLOAD} - -{postrow.attach.tor_reged.FILESIZE} - - |
-
{L_TOR_STATUS}: | -- {postrow.attach.tor_reged.TOR_STATUS_ICON} {postrow.attach.tor_reged.TOR_STATUS_TEXT} - {postrow.attach.tor_reged.TOR_STATUS_BY} - - - - - - - - - - - {postrow.attach.tor_reged.TOR_STATUS_SELECT} - - - - - - - | -|
{L_COMPLETED}: | -{postrow.attach.tor_reged.COMPLETED} | -|
{L_SIZE}: | -{postrow.attach.tor_reged.TORRENT_SIZE} | -|
{postrow.attach.tor_reged.comment.COMMENT} | -||
- - - - - - - {TOR_HELP_LINKS} - - - - | -
Правила для правообладателей |
{TOR_BLOCKED_MSG} |
{TOR_BLOCKED_MSG} |
{$bb_cfg['bt_ratio_warning_msg']} |
{RATIO_WARN_MSG} |
{$bb_cfg['tor_help_links_top']} | -||
Торрент: | -Зарегистрирован{TRACKER_REG_LINK} [ {REGED_TIME} ] | -
-
- Скачать .torrent - - - - -{FILESIZE} - - |
-
Статус: | -style="padding: 6px 4px;"> - {TOR_STATUS_ICON} {TOR_STATUS_TEXT} - - · {TOR_STATUS_USERNAME} · {TOR_STATUS_TIME} назад - - - - - Изменить на: - [ Изменить ] - - - - | -|
.torrent скачан: | -{TOR_COMPLETED} | -|
Размер: | -{TOR_SIZE} | -|
- - - - {$bb_cfg['tor_help_links_bottom']} - - - - | -||
{DOWNLOAD_NAME} {MAGNET} | +||
---|---|---|
![]() ![]() |
+ ||
![]() ![]() |
+ ||
{L_TORRENT}: | ++ {TRACKER_REG_LINK} + [ {REGED_TIME} ] + · {HASH} + | +
+
+ {S_UPLOAD_IMAGE} +{L_DOWNLOAD} + + + + +{FILESIZE} + + |
+
{L_TOR_STATUS}: | ++ {TOR_STATUS_ICON} {TOR_STATUS_TEXT} + {TOR_STATUS_BY} + + + + + + + + + {TOR_STATUS_SELECT} + + + + + + + | +|
{L_COMPLETED}: | +{TOR_COMPLETED} | +|
{L_SIZE}: | +{TOR_SIZE} | +|
+ + + + + + + {TOR_HELP_LINKS} + + + + | +