Elvis operator can be used.

(cherry picked from commit 6a3bf7c)
This commit is contained in:
Yuriy Pikhtarev 2017-05-05 00:58:40 +03:00 committed by Vasily Komrakov
commit 13e3cf6c0d
No known key found for this signature in database
GPG key ID: 558236680C20A69A
16 changed files with 33 additions and 33 deletions

View file

@ -57,10 +57,10 @@ $full_url = isset($_POST['full_url']) ? str_replace('&', '&', htmlspecialcha
if (isset($_POST['redirect_type']) && $_POST['redirect_type'] == 'search') {
$redirect_type = "search.php";
$redirect = ($full_url) ? $full_url : "$dl_key=1";
$redirect = ($full_url) ?: "$dl_key=1";
} else {
$redirect_type = (!$topic_id) ? "viewforum.php" : "viewtopic.php";
$redirect = ($full_url) ? $full_url : ((!$topic_id) ? POST_FORUM_URL . "=$forum_id" : POST_TOPIC_URL . "=$topic_id");
$redirect = ($full_url) ?: ((!$topic_id) ? POST_FORUM_URL . "=$forum_id" : POST_TOPIC_URL . "=$topic_id");
}
// Start session management