Minor improvements (#1285)

This commit is contained in:
Roman Kelesidis 2023-12-30 00:32:22 +07:00 committed by GitHub
commit 28fb4cbffb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View file

@ -327,6 +327,13 @@ if (($delete || $mode == 'delete') && !$confirm) {
$attach_rg_sig = (isset($_POST['attach_rg_sig'], $_POST['poster_rg']) && $_POST['poster_rg'] != -1) ? 1 : 0; $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; $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']
if ($post_info['allow_reg_tracker'] && $post_data['first_post'] && !empty($bb_cfg['tor_cannot_edit']) /*&& !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('Вы не можете редактировать релиз, если он имеет статус: ' . '<span title="' . $lang['TOR_STATUS_NAME'][$tor_status['tor_status']] . '">' . $bb_cfg['tor_icons'][$tor_status['tor_status']] . '&nbsp;' . $lang['TOR_STATUS_NAME'][$tor_status['tor_status']] . '</span>.');
}
}
\TorrentPier\Legacy\Post::prepare_post($mode, $post_data, $error_msg, $username, $subject, $message); \TorrentPier\Legacy\Post::prepare_post($mode, $post_data, $error_msg, $username, $subject, $message);
if (!$error_msg) { if (!$error_msg) {

View file

@ -982,7 +982,7 @@ class Template
*/ */
public function write_cache($filename, $code) public function write_cache($filename, $code)
{ {
file_write($code, $filename, false, true, true); file_write($code, $filename, max_size: false, replace_content: true);
} }
public function xs_startup() public function xs_startup()

View file

@ -156,7 +156,7 @@
<tr> <tr>
<td class="prof-title">{L_LOCATION}:</td> <td class="prof-title">{L_LOCATION}:</td>
<td> <td>
<div><input type="text" name="user_from" size="50" maxlength="100" value="{USER_FROM}"/><br><h6>❤️ Country flags provided by <a href="https://github.com/hampusborgos/country-flags/" target="_blank">https://github.com/hampusborgos/country-flags/</a></h6></div> <div><input type="text" name="user_from" size="50" maxlength="100" value="{USER_FROM}"/><br><h6>❤️ Country flags provided by <a href="https://github.com/hampusborgos/country-flags/blob/ba2cf4101bf029d2ada26da2f95121de74581a4d/countries.json" target="_blank">https://github.com/hampusborgos/country-flags/</a></h6></div>
</td> </td>
</tr> </tr>
<!-- ENDIF --> <!-- ENDIF -->