From: Roland Häder Date: Wed, 4 Nov 2020 12:35:00 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5ada80cd424d37b46c8b36d38a3bc1424da7fe23;p=ctracker.git Continued: - prevented more local variables and if/else blocks - updated TODOs.txt Signed-off-by: Roland Häder --- diff --git a/docs/TODOs.txt b/docs/TODOs.txt index 4da2535..0387416 100644 --- a/docs/TODOs.txt +++ b/docs/TODOs.txt @@ -1,5 +1,5 @@ ### WARNING: THIS FILE IS AUTO-GENERATED BY ./todo-builder.sh ### ### DO NOT EDIT THIS FILE. ### -./libs/lib_detector.php:124: // @TODO Misc/unsorted -./libs/lib_general.php:407: // @TODO Why can't domain be set to value from crackerTrackerServerName() ? +./libs/lib_detector.php:160: // @TODO Misc/unsorted +./libs/lib_general.php:488: // @TODO Why can't domain be set to value from crackerTrackerServerName() ? ### ### DEPRECATION FOLLOWS: ### ### diff --git a/libs/lib_general.php b/libs/lib_general.php index 55a0fde..d6e1a87 100644 --- a/libs/lib_general.php +++ b/libs/lib_general.php @@ -498,20 +498,13 @@ function ifCrackerTrackerCookieIsSet () { // Redirects to the same URL function crackerTrackerRedirectSameUrl () { - // Construct the url - $url = '://' . crackerTrackerServerName() . crackerTrackerScriptName() . '?' . crackerTrackerQueryString(); - - // Do we have SSL? - if (crackerTrackerSecured()) { - // HTTPS - $url = 'https' . $url; - } else { - // HTTP - $url = 'http' . $url; - } - - // And redirect - crackerTrackerSendRawRedirect($url); + // Construct and redirect to same URL + crackerTrackerSendRawRedirect(sprintf('%s://%s%s?%s', + (crackerTrackerSecured() ? 'https' : 'http'), + crackerTrackerServerName(), + crackerTrackerScriptName(), + crackerTrackerQueryString() + )); } /** @@ -522,7 +515,6 @@ function crackerTrackerRedirectSameUrl () { * * @link http://support.microsoft.com/kb/q176113/ * @author Andreas Gohr - * @access private */ function crackerTrackerSendRawRedirect ($url) { // Better remove any data by ctracker