Fix code style

This commit is contained in:
Fedor A. Fetisov 2021-08-28 00:40:29 +03:00
parent 2533b362ab
commit dc9f128b79
2 changed files with 2 additions and 5 deletions

View File

@ -590,8 +590,7 @@ function visitor_from_request()
$cookie_properties = array( 'expires' => time() + 60 * 60 * 24 * 365 ); $cookie_properties = array( 'expires' => time() + 60 * 60 * 24 * 365 );
if (version_compare(phpversion(), '7.3.0', '<')) { if (version_compare(phpversion(), '7.3.0', '<')) {
setcookie(USERID_COOKIE_NAME, $user_id, $cookie_properties['expires']); setcookie(USERID_COOKIE_NAME, $user_id, $cookie_properties['expires']);
} } else {
else {
if ($tmp_request->isSecure()) { if ($tmp_request->isSecure()) {
$cookie_properties['samesite'] = 'None'; $cookie_properties['samesite'] = 'None';
$cookie_properties['secure'] = true; $cookie_properties['secure'] = true;

View File

@ -60,8 +60,7 @@ class WidgetController extends AbstractController
if ($rnd_value1 !== $rnd_value2) { if ($rnd_value1 !== $rnd_value2) {
$cookies_blocked = true; $cookies_blocked = true;
} }
} } else {
else {
$cookies_blocked = true; $cookies_blocked = true;
} }
@ -75,7 +74,6 @@ class WidgetController extends AbstractController
&& !$cookies_blocked; && !$cookies_blocked;
if ($tracking_allowed) { if ($tracking_allowed) {
$entry = $request->query->get('entry', ''); $entry = $request->query->get('entry', '');
$referer = $request->server->get('HTTP_REFERER', ''); $referer = $request->server->get('HTTP_REFERER', '');
$user_id = $request->query->get('user_id', false); $user_id = $request->query->get('user_id', false);