From e87c75d27edb0ccbfb1f09c0eeea544781066e7d Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sun, 31 Dec 2023 11:48:30 +0700 Subject: [PATCH] Minor improvements (#1298) * Minor improvements * Update CHANGELOG.md --- CHANGELOG.md | 2 +- src/Legacy/Attach.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 950559f98..92585b759 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ - search.php parameter sanitizing [\#1213](https://github.com/torrentpier/torrentpier/pull/1213) ([kovalensky](https://github.com/kovalensky), [belomaxorka](https://github.com/belomaxorka)) - Limit execution time for forum file-listing [\#1211](https://github.com/torrentpier/torrentpier/pull/1211) ([kovalensky](https://github.com/kovalensky), [belomaxorka](https://github.com/belomaxorka)) - Some reported bugfixes [\#1214](https://github.com/torrentpier/torrentpier/pull/1214), [\#1275](https://github.com/torrentpier/torrentpier/pull/1275) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#1206](https://github.com/torrentpier/torrentpier/pull/1206), [\#1215](https://github.com/torrentpier/torrentpier/pull/1215), [\#1217](https://github.com/torrentpier/torrentpier/pull/1217), [\#1219](https://github.com/torrentpier/torrentpier/pull/1219), [\#1220](https://github.com/torrentpier/torrentpier/pull/1220), [\#1224](https://github.com/torrentpier/torrentpier/pull/1224), [\#1228](https://github.com/torrentpier/torrentpier/pull/1228), [\#1229](https://github.com/torrentpier/torrentpier/pull/1229), [\#1230](https://github.com/torrentpier/torrentpier/pull/1230), [\#1234](https://github.com/torrentpier/torrentpier/pull/1234), [\#1236](https://github.com/torrentpier/torrentpier/pull/1236), [\#1243](https://github.com/torrentpier/torrentpier/pull/1243), [\#1248](https://github.com/torrentpier/torrentpier/pull/1248), [\#1253](https://github.com/torrentpier/torrentpier/pull/1253), [\#1254](https://github.com/torrentpier/torrentpier/pull/1254), [\#1259](https://github.com/torrentpier/torrentpier/pull/1259), [\#1263](https://github.com/torrentpier/torrentpier/pull/1263), [\#1265](https://github.com/torrentpier/torrentpier/pull/1265), [\#1266](https://github.com/torrentpier/torrentpier/pull/1266), [\#1271](https://github.com/torrentpier/torrentpier/pull/1271), [\#1273](https://github.com/torrentpier/torrentpier/pull/1273), [\#1279](https://github.com/torrentpier/torrentpier/pull/1279), [\#1281](https://github.com/torrentpier/torrentpier/pull/1281), [\#1285](https://github.com/torrentpier/torrentpier/pull/1285), [\#1286](https://github.com/torrentpier/torrentpier/pull/1286), [\#1289](https://github.com/torrentpier/torrentpier/pull/1289), [\#1294](https://github.com/torrentpier/torrentpier/pull/1294) ([belomaxorka](https://github.com/belomaxorka)) +- Minor improvements [\#1206](https://github.com/torrentpier/torrentpier/pull/1206), [\#1215](https://github.com/torrentpier/torrentpier/pull/1215), [\#1217](https://github.com/torrentpier/torrentpier/pull/1217), [\#1219](https://github.com/torrentpier/torrentpier/pull/1219), [\#1220](https://github.com/torrentpier/torrentpier/pull/1220), [\#1224](https://github.com/torrentpier/torrentpier/pull/1224), [\#1228](https://github.com/torrentpier/torrentpier/pull/1228), [\#1229](https://github.com/torrentpier/torrentpier/pull/1229), [\#1230](https://github.com/torrentpier/torrentpier/pull/1230), [\#1234](https://github.com/torrentpier/torrentpier/pull/1234), [\#1236](https://github.com/torrentpier/torrentpier/pull/1236), [\#1243](https://github.com/torrentpier/torrentpier/pull/1243), [\#1248](https://github.com/torrentpier/torrentpier/pull/1248), [\#1253](https://github.com/torrentpier/torrentpier/pull/1253), [\#1254](https://github.com/torrentpier/torrentpier/pull/1254), [\#1259](https://github.com/torrentpier/torrentpier/pull/1259), [\#1263](https://github.com/torrentpier/torrentpier/pull/1263), [\#1265](https://github.com/torrentpier/torrentpier/pull/1265), [\#1266](https://github.com/torrentpier/torrentpier/pull/1266), [\#1271](https://github.com/torrentpier/torrentpier/pull/1271), [\#1273](https://github.com/torrentpier/torrentpier/pull/1273), [\#1279](https://github.com/torrentpier/torrentpier/pull/1279), [\#1281](https://github.com/torrentpier/torrentpier/pull/1281), [\#1285](https://github.com/torrentpier/torrentpier/pull/1285), [\#1286](https://github.com/torrentpier/torrentpier/pull/1286), [\#1289](https://github.com/torrentpier/torrentpier/pull/1289), [\#1294](https://github.com/torrentpier/torrentpier/pull/1294), [\#1298](https://github.com/torrentpier/torrentpier/pull/1298) ([belomaxorka](https://github.com/belomaxorka)) - Fixed extensions issue [\#1218](https://github.com/torrentpier/torrentpier/pull/1218) ([belomaxorka](https://github.com/belomaxorka)) - Fixed broken sorting in group.php [\#1221](https://github.com/torrentpier/torrentpier/pull/1221) ([belomaxorka](https://github.com/belomaxorka)) - Code re-formatting [\#1225](https://github.com/torrentpier/torrentpier/pull/1225) ([kovalensky](https://github.com/kovalensky)) diff --git a/src/Legacy/Attach.php b/src/Legacy/Attach.php index 9b45034fe..d0dec2298 100644 --- a/src/Legacy/Attach.php +++ b/src/Legacy/Attach.php @@ -199,7 +199,7 @@ class Attach */ public function handle_attachments($mode) { - global $is_auth, $attach_config, $refresh, $post_id, $submit, $preview, $error, $error_msg, $lang; + global $is_auth, $attach_config, $refresh, $update_attachment, $post_id, $submit, $preview, $error, $error_msg, $lang; // // ok, what shall we do ;) @@ -826,7 +826,7 @@ class Attach //bt // Block uploading more than one torrent file global $update_attachment; - if (!$error && !$update_attachment && $this->extension === TORRENT_EXT && in_array(TORRENT_EXT, $this->attachment_extension_list)) { + if (!$error && $this->extension === TORRENT_EXT && in_array(TORRENT_EXT, $this->attachment_extension_list) && !$update_attachment) { $error = true; if (!empty($error_msg)) { $error_msg .= '
';