Skip to content

Commit 831e947

Browse files
committed
Upd. Processing the get parameter
1 parent f457034 commit 831e947

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

uniforce/router.php

+10-3
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,28 @@
88

99
require_once 'inc' . DIRECTORY_SEPARATOR . 'actions.php'; // Actions
1010

11+
$first_load = 0;
12+
foreach ($_GET as $key => $value) {
13+
if ($key == 'first_load') {
14+
$first_load = (int)$value;
15+
}
16+
}
17+
1118
// URL ROUTING
1219
switch (true){
1320
// Installation
14-
case \Cleantalk\USP\Common\State::getInstance()->data->is_installed === false:
21+
case \Cleantalk\USP\Common\State::getInstance()->data->is_installed === false && $first_load === 0:
1522
$page = 'install';
1623
break;
1724
// Login
18-
case \Cleantalk\USP\Variables\Cookie::get('authentificated') !== \Cleantalk\USP\Common\State::getInstance()->data->security_key:
25+
case \Cleantalk\USP\Variables\Cookie::get('authentificated') !== \Cleantalk\USP\Common\State::getInstance()->data->security_key && $first_load === 0:
1926
$additional_js = array(
2027
'ct_js_test',
2128
);
2229
$page = 'login';
2330
break;
2431
// Settings
25-
case \Cleantalk\USP\Variables\Cookie::get('authentificated') === \Cleantalk\USP\Common\State::getInstance()->data->security_key:
32+
case \Cleantalk\USP\Variables\Cookie::get('authentificated') === \Cleantalk\USP\Common\State::getInstance()->data->security_key || $first_load === 1:
2633
$additional_js = array(
2734
'scanner-plugin',
2835
'scanner',

0 commit comments

Comments
 (0)