diff --git a/CHANGELOG.md b/CHANGELOG.md index 742b026f5..bf29cb9be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,6 @@ - Added `bt_announce_url` autofill [\#1331](https://github.com/torrentpier/torrentpier/pull/1331) ([belomaxorka](https://github.com/belomaxorka)) - Added "Random release" button in tracker.php [\#1334](https://github.com/torrentpier/torrentpier/pull/1334) ([belomaxorka](https://github.com/belomaxorka)) - Added support for fastly cdn [\#1327](https://github.com/torrentpier/torrentpier/pull/1327) ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky)) -- Use constants instead of string literals [\#1332](https://github.com/torrentpier/torrentpier/pull/1332) ([belomaxorka](https://github.com/belomaxorka)) - Use `target="_blank"` in admin for profile_url() redirects [\#1330](https://github.com/torrentpier/torrentpier/pull/1330) ([belomaxorka](https://github.com/belomaxorka)) - Used declensions for days in some cases [\#1310](https://github.com/torrentpier/torrentpier/pull/1310) ([belomaxorka](https://github.com/belomaxorka)) - Used datastore to show statistic for more performance [\#1309](https://github.com/torrentpier/torrentpier/pull/1309) ([belomaxorka](https://github.com/belomaxorka)) diff --git a/dl_list.php b/dl_list.php index a932b732f..8f32e231e 100644 --- a/dl_list.php +++ b/dl_list.php @@ -42,8 +42,8 @@ if (isset($_POST['redirect_type']) && $_POST['redirect_type'] == 'search') { $redirect_type = 'search.php'; $redirect = $full_url ?: "$dl_key=1"; } else { - $redirect_type = $topic_id ? TOPIC_URL : FORUM_URL; - $redirect = $full_url ?: ($topic_id ? $redirect_type . $topic_id : $redirect_type . $forum_id); + $redirect_type = (!$topic_id) ? 'viewforum.php' : 'viewtopic.php'; + $redirect = $full_url ?: ((!$topic_id) ? POST_FORUM_URL . "=$forum_id" : POST_TOPIC_URL . "=$topic_id"); } // Start session management