Use constants instead of string literals (#1332)

* Minor improvements

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2024-01-23 16:05:03 +07:00 committed by GitHub
commit cdb33ba7a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -8,6 +8,7 @@
- Release 2.4.1 🦉 ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky))
- Added `bt_announce_url` autofill [\#1331](https://github.com/torrentpier/torrentpier/pull/1331) ([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))

View file

@ -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) ? 'viewforum.php' : 'viewtopic.php';
$redirect = $full_url ?: ((!$topic_id) ? POST_FORUM_URL . "=$forum_id" : POST_TOPIC_URL . "=$topic_id");
$redirect_type = $topic_id ? TOPIC_URL : FORUM_URL;
$redirect = $full_url ?: ($topic_id ? $redirect_type . $topic_id : $redirect_type . $forum_id);
}
// Start session management