File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 8
8
9
9
require_once 'inc ' . DIRECTORY_SEPARATOR . 'actions.php ' ; // Actions
10
10
11
+ $ first_load = 0 ;
12
+ foreach ($ _GET as $ key => $ value ) {
13
+ if ($ key == 'first_load ' ) {
14
+ $ first_load = (int )$ value ;
15
+ }
16
+ }
17
+
11
18
// URL ROUTING
12
19
switch (true ){
13
20
// 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 :
15
22
$ page = 'install ' ;
16
23
break ;
17
24
// 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 :
19
26
$ additional_js = array (
20
27
'ct_js_test ' ,
21
28
);
22
29
$ page = 'login ' ;
23
30
break ;
24
31
// 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 :
26
33
$ additional_js = array (
27
34
'scanner-plugin ' ,
28
35
'scanner ' ,
You can’t perform that action at this time.
0 commit comments