mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Minor improvements (#1285)
This commit is contained in:
parent
8adb0eae3b
commit
28fb4cbffb
3 changed files with 9 additions and 2 deletions
|
@ -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;
|
||||
$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']] . ' ' . $lang['TOR_STATUS_NAME'][$tor_status['tor_status']] . '</span>.');
|
||||
}
|
||||
}
|
||||
|
||||
\TorrentPier\Legacy\Post::prepare_post($mode, $post_data, $error_msg, $username, $subject, $message);
|
||||
|
||||
if (!$error_msg) {
|
||||
|
|
|
@ -982,7 +982,7 @@ class Template
|
|||
*/
|
||||
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()
|
||||
|
|
|
@ -156,7 +156,7 @@
|
|||
<tr>
|
||||
<td class="prof-title">{L_LOCATION}:</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>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue