Passed
Branch — wip_sessions (830972)
by Nils
07:55
created
install--ASUPPRIMER/upgrade_run_3.0.0_passwords.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
         $database,
79 79
         $port
80 80
     );
81
-	$db_link->set_charset(DB_ENCODING);
81
+    $db_link->set_charset(DB_ENCODING);
82 82
 } else {
83 83
     $res = 'Impossible to get connected to server. Error is: '.addslashes(mysqli_connect_error());
84 84
     echo '[{"finish":"1", "error":"Impossible to get connected to server. Error is: '.addslashes(mysqli_connect_error()).'!"}]';
Please login to merge, or discard this patch.
install--ASUPPRIMER/upgrade_run_3.0.0_logs.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
         $database,
78 78
         $port
79 79
     );
80
-	$db_link->set_charset(DB_ENCODING);
80
+    $db_link->set_charset(DB_ENCODING);
81 81
 } else {
82 82
     $res = 'Impossible to get connected to server. Error is: '.addslashes(mysqli_connect_error());
83 83
     echo '[{"finish":"1", "error":"Impossible to get connected to server. Error is: '.addslashes(mysqli_connect_error()).'!"}]';
Please login to merge, or discard this patch.
install--ASUPPRIMER/upgrade_run_3.0.0_files.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
         $database,
83 83
         $port
84 84
     );
85
-	$db_link->set_charset(DB_ENCODING);
85
+    $db_link->set_charset(DB_ENCODING);
86 86
 } else {
87 87
     $res = 'Impossible to get connected to server. Error is: '.addslashes(mysqli_connect_error());
88 88
     echo '[{"finish":"1", "error":"Impossible to get connected to server. Error is: '.addslashes(mysqli_connect_error()).'!"}]';
Please login to merge, or discard this patch.
install--ASUPPRIMER/upgrade_ajax.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
 // Do we need to rewrite the settings.php file?
68 68
 if (defined("DB_PASSWD") === false) {
69
-	$settingsFile = '../includes/config/settings.php';
69
+    $settingsFile = '../includes/config/settings.php';
70 70
     if (null !== SECUREPATH) { //3.0.0.23
71 71
         //Do a copy of the existing file
72 72
         if (!copy(
@@ -191,17 +191,17 @@  discard block
 block discarded – undo
191 191
 define("SECUREPATH", "' . str_replace('\\', '\\\\', SECUREPATH) . '");';
192 192
 define("SECUREFILE", "' . SECUREFILE. '");
193 193
 
194
-		if (defined('IKEY') === true) $settingsTxt .= '
194
+        if (defined('IKEY') === true) $settingsTxt .= '
195 195
 define("IKEY", "' . IKEY . '");';
196
-		else $settingsTxt .= '
196
+        else $settingsTxt .= '
197 197
 define("IKEY", "");';
198
-		if (defined('SKEY') === true) $settingsTxt .= '
198
+        if (defined('SKEY') === true) $settingsTxt .= '
199 199
 define("SKEY", "' . SKEY . '");';
200
-		else $settingsTxt .= '
200
+        else $settingsTxt .= '
201 201
 define("SKEY", "");';
202
-		if (defined('HOST') === true) $settingsTxt .= '
202
+        if (defined('HOST') === true) $settingsTxt .= '
203 203
 define("HOST", "' . HOST . '");';
204
-		else $settingsTxt .= '
204
+        else $settingsTxt .= '
205 205
 define("HOST", "");';
206 206
 
207 207
 
Please login to merge, or discard this patch.
install--ASUPPRIMER/upgrade_run_3.0.0_fields.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
         $database,
78 78
         $port
79 79
     );
80
-	$db_link->set_charset(DB_ENCODING);
80
+    $db_link->set_charset(DB_ENCODING);
81 81
 } else {
82 82
     $res = 'Impossible to get connected to server. Error is: '.addslashes(mysqli_connect_error());
83 83
     echo '[{"finish":"1", "error":"Impossible to get connected to server. Error is: '.addslashes(mysqli_connect_error()).'!"}]';
Please login to merge, or discard this patch.
install--ASUPPRIMER/install.php 1 patch
Indentation   +117 added lines, -117 removed lines patch added patch discarded remove patch
@@ -39,68 +39,68 @@  discard block
 block discarded – undo
39 39
 
40 40
 <body>
41 41
 	<?php
42
-	// define root path
43
-	$abs_path = rtrim(
44
-		filter_var($_SERVER['DOCUMENT_ROOT'], FILTER_SANITIZE_FULL_SPECIAL_CHARS),
45
-		'/'
46
-	) . substr(
47
-		filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_FULL_SPECIAL_CHARS),
48
-		0,
49
-		strlen(filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_FULL_SPECIAL_CHARS)) - 20
50
-	);
51
-	if (isset($_SERVER['HTTPS'])) {
52
-		$protocol = 'https://';
53
-	} else {
54
-		$protocol = 'http://';
55
-	}
42
+    // define root path
43
+    $abs_path = rtrim(
44
+        filter_var($_SERVER['DOCUMENT_ROOT'], FILTER_SANITIZE_FULL_SPECIAL_CHARS),
45
+        '/'
46
+    ) . substr(
47
+        filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_FULL_SPECIAL_CHARS),
48
+        0,
49
+        strlen(filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_FULL_SPECIAL_CHARS)) - 20
50
+    );
51
+    if (isset($_SERVER['HTTPS'])) {
52
+        $protocol = 'https://';
53
+    } else {
54
+        $protocol = 'http://';
55
+    }
56 56
 
57 57
 
58
-	$post_step = filter_input(INPUT_POST, 'step', FILTER_SANITIZE_NUMBER_INT);
59
-	$post_db_host = filter_input(INPUT_POST, 'db_host', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
60
-	if (empty($post_db_host) === true) {
61
-		$post_db_host = filter_input(INPUT_POST, 'hid_db_host', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
62
-	}
63
-	$post_db_login = filter_input(INPUT_POST, 'db_login', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
64
-	if (empty($post_db_login) === true) {
65
-		$post_db_login = filter_input(INPUT_POST, 'hid_db_login', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
66
-	}
67
-	$post_db_pwd = filter_input(INPUT_POST, 'db_pwd', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
68
-	if (empty($post_db_pwd) === true) {
69
-		$post_db_pwd = filter_input(INPUT_POST, 'hid_db_pwd', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
70
-	}
71
-	$post_db_port = filter_input(INPUT_POST, 'db_port', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
72
-	if (empty($post_db_port) === true) {
73
-		$post_db_port = filter_input(INPUT_POST, 'hid_db_port', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
74
-	}
75
-	$post_db_bdd = filter_input(INPUT_POST, 'db_bdd', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
76
-	if (empty($post_db_bdd) === true) {
77
-		$post_db_bdd = filter_input(INPUT_POST, 'hid_db_bdd', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
78
-	}
79
-	$post_db_pre = filter_input(INPUT_POST, 'db_pre', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
80
-	if (empty($post_db_pre) === true) {
81
-		$post_db_pre = filter_input(INPUT_POST, 'hid_db_pre', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
82
-	}
83
-	$post_absolute_path = filter_input(INPUT_POST, 'absolute_path', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
84
-	if (empty($post_absolute_path) === true) {
85
-		$post_absolute_path = filter_input(INPUT_POST, 'hid_absolute_path', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
86
-	}
87
-	$post_url_path = filter_input(INPUT_POST, 'url_path', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
88
-	if (empty($post_url_path) === true) {
89
-		$post_url_path = filter_input(INPUT_POST, 'hid_url_path', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
90
-	}
91
-	$post_sk_path = filter_input(INPUT_POST, 'sk_path', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
92
-	if (empty($post_sk_path) === true) {
93
-		$post_sk_path = filter_input(INPUT_POST, 'hid_sk_path', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
94
-	}
58
+    $post_step = filter_input(INPUT_POST, 'step', FILTER_SANITIZE_NUMBER_INT);
59
+    $post_db_host = filter_input(INPUT_POST, 'db_host', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
60
+    if (empty($post_db_host) === true) {
61
+        $post_db_host = filter_input(INPUT_POST, 'hid_db_host', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
62
+    }
63
+    $post_db_login = filter_input(INPUT_POST, 'db_login', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
64
+    if (empty($post_db_login) === true) {
65
+        $post_db_login = filter_input(INPUT_POST, 'hid_db_login', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
66
+    }
67
+    $post_db_pwd = filter_input(INPUT_POST, 'db_pwd', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
68
+    if (empty($post_db_pwd) === true) {
69
+        $post_db_pwd = filter_input(INPUT_POST, 'hid_db_pwd', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
70
+    }
71
+    $post_db_port = filter_input(INPUT_POST, 'db_port', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
72
+    if (empty($post_db_port) === true) {
73
+        $post_db_port = filter_input(INPUT_POST, 'hid_db_port', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
74
+    }
75
+    $post_db_bdd = filter_input(INPUT_POST, 'db_bdd', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
76
+    if (empty($post_db_bdd) === true) {
77
+        $post_db_bdd = filter_input(INPUT_POST, 'hid_db_bdd', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
78
+    }
79
+    $post_db_pre = filter_input(INPUT_POST, 'db_pre', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
80
+    if (empty($post_db_pre) === true) {
81
+        $post_db_pre = filter_input(INPUT_POST, 'hid_db_pre', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
82
+    }
83
+    $post_absolute_path = filter_input(INPUT_POST, 'absolute_path', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
84
+    if (empty($post_absolute_path) === true) {
85
+        $post_absolute_path = filter_input(INPUT_POST, 'hid_absolute_path', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
86
+    }
87
+    $post_url_path = filter_input(INPUT_POST, 'url_path', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
88
+    if (empty($post_url_path) === true) {
89
+        $post_url_path = filter_input(INPUT_POST, 'hid_url_path', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
90
+    }
91
+    $post_sk_path = filter_input(INPUT_POST, 'sk_path', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
92
+    if (empty($post_sk_path) === true) {
93
+        $post_sk_path = filter_input(INPUT_POST, 'hid_sk_path', FILTER_SANITIZE_FULL_SPECIAL_CHARS);
94
+    }
95 95
 
96
-	// Get some data
97
-	include "../includes/config/include.php";
96
+    // Get some data
97
+    include "../includes/config/include.php";
98 98
 
99
-	// # LOADER
100
-	echo '
99
+    // # LOADER
100
+    echo '
101 101
     <div style="position:absolute;top:49%;left:49%;display:none;z-index:9999999;" id="loader"><img src="images/76.gif" /></div>';
102
-	// # HEADER ##
103
-	echo '
102
+    // # HEADER ##
103
+    echo '
104 104
 	<div id="top">
105 105
 		<div id="logo" class="lcol"><img src="../includes/images/teampass-logo2-home.png" /></div>
106 106
 		<div class="lcol">
@@ -131,9 +131,9 @@  discard block
 block discarded – undo
131 131
                 </h3>
132 132
             </div>
133 133
             <div class="card-body">';
134
-	if (!isset($_GET['step']) && !isset($post_step)) {
135
-		//ETAPE O
136
-		echo '
134
+    if (!isset($_GET['step']) && !isset($post_step)) {
135
+        //ETAPE O
136
+        echo '
137 137
 				<div class="row">
138 138
                     <div class="callout callout-warning col-12">
139 139
                         <h5><i class="fas fa-info-circle text-warning mr-2"></i>Welcome to Teampass installation</h5>
@@ -159,13 +159,13 @@  discard block
 block discarded – undo
159 159
 						<p><a class="text-primary" target="_blank" href="https://spdx.org/licenses/GPL-3.0-only.html#licenseText">Read complete license</a>
160 160
                     </div>
161 161
                 </div>';
162
-		// STEP1
163
-	} elseif ((isset($post_step) && $post_step == 2)
164
-		|| (isset($_GET['step']) && $_GET['step'] == 2)
165
-		&& $post_user_granted === '1'
166
-	) {
167
-		//ETAPE 1
168
-		echo '
162
+        // STEP1
163
+    } elseif ((isset($post_step) && $post_step == 2)
164
+        || (isset($_GET['step']) && $_GET['step'] == 2)
165
+        && $post_user_granted === '1'
166
+    ) {
167
+        //ETAPE 1
168
+        echo '
169 169
 	<div class="row">
170 170
 		<div class="col-12">
171 171
 			<div class="card card-primary">
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 		</div>
187 187
 	</div>';
188 188
 
189
-	echo '
189
+    echo '
190 190
 	<div class="row">
191 191
 		<div class="col-12">
192 192
 			<div class="card card-primary">
@@ -225,13 +225,13 @@  discard block
 block discarded – undo
225 225
 			</div>
226 226
 		</div>
227 227
 	</div>';
228
-		// STEP2
229
-	} elseif ((isset($post_step) && $post_step == 3)
230
-		|| (isset($_GET['step']) && $_GET['step'] == 3)
231
-		&& $post_user_granted === '1'
232
-	) {
233
-		//ETAPE 2
234
-		echo '
228
+        // STEP2
229
+    } elseif ((isset($post_step) && $post_step == 3)
230
+        || (isset($_GET['step']) && $_GET['step'] == 3)
231
+        && $post_user_granted === '1'
232
+    ) {
233
+        //ETAPE 2
234
+        echo '
235 235
 	<div class="row">
236 236
 		<div class="col-12">
237 237
 			<div class="card card-primary">
@@ -268,13 +268,13 @@  discard block
 block discarded – undo
268 268
 		</div>
269 269
 	</div>';
270 270
 
271
-		// STEP3
272
-	} elseif ((isset($post_step) && $post_step == 4)
273
-		|| (isset($_GET['step']) && $_GET['step'] == 4)
274
-		&& $post_user_granted === '1'
275
-	) {
276
-		//ETAPE 3
277
-		echo '
271
+        // STEP3
272
+    } elseif ((isset($post_step) && $post_step == 4)
273
+        || (isset($_GET['step']) && $_GET['step'] == 4)
274
+        && $post_user_granted === '1'
275
+    ) {
276
+        //ETAPE 3
277
+        echo '
278 278
 	<div class="row">
279 279
 		<div class="col-12">
280 280
 			<div class="card card-primary">
@@ -310,13 +310,13 @@  discard block
 block discarded – undo
310 310
 	</div>';
311 311
 
312 312
 
313
-		// STEP4
314
-	} elseif ((isset($post_step) && $post_step == 5)
315
-		|| (isset($_GET['step']) && $_GET['step'] == 5)
316
-		&& $post_user_granted === '1'
317
-	) {
318
-		//ETAPE 4
319
-		echo '
313
+        // STEP4
314
+    } elseif ((isset($post_step) && $post_step == 5)
315
+        || (isset($_GET['step']) && $_GET['step'] == 5)
316
+        && $post_user_granted === '1'
317
+    ) {
318
+        //ETAPE 4
319
+        echo '
320 320
 	<div class="row">
321 321
 		<div class="col-12">
322 322
 			<div class="card card-primary">
@@ -330,13 +330,13 @@  discard block
 block discarded – undo
330 330
 		</div>
331 331
 	</div>';
332 332
 
333
-		// STEP5
334
-	} elseif ((isset($post_step) && $post_step == 6)
335
-		|| (isset($_GET['step']) && $_GET['step'] == 6)
336
-		&& $post_user_granted === '1'
337
-	) {
338
-		//ETAPE 5
339
-		echo '
333
+        // STEP5
334
+    } elseif ((isset($post_step) && $post_step == 6)
335
+        || (isset($_GET['step']) && $_GET['step'] == 6)
336
+        && $post_user_granted === '1'
337
+    ) {
338
+        //ETAPE 5
339
+        echo '
340 340
 	<div class="row">
341 341
 		<div class="col-12">
342 342
 			<div class="card card-primary">
@@ -357,13 +357,13 @@  discard block
 block discarded – undo
357 357
 		</div>
358 358
 	</div>';
359 359
 
360
-		// STEP6
361
-	} elseif ((isset($post_step) && $post_step == 7)
362
-		|| (isset($_GET['step']) && $_GET['step'] == 7)
363
-		&& $post_user_granted === '1'
364
-	) {
365
-		//ETAPE 6
366
-		echo '
360
+        // STEP6
361
+    } elseif ((isset($post_step) && $post_step == 7)
362
+        || (isset($_GET['step']) && $_GET['step'] == 7)
363
+        && $post_user_granted === '1'
364
+    ) {
365
+        //ETAPE 6
366
+        echo '
367 367
 	<div class="row">
368 368
 		<div class="callout callout-primary col-12">
369 369
 			<h4>Thank you for installing <b>Teampass</b>.</h4>
@@ -391,32 +391,32 @@  discard block
 block discarded – undo
391 391
 			</div>
392 392
 		</div>
393 393
 	</div>';
394
-	}
394
+    }
395 395
 
396
-	echo '	
396
+    echo '	
397 397
 	</div>	
398 398
         <div class="card-footer">';
399
-	//buttons
400
-	if (!isset($post_step)) {
401
-		echo '
399
+    //buttons
400
+    if (!isset($post_step)) {
401
+        echo '
402 402
             <input type="button" class="btn btn-primary" id="but_next" target_id="2" class="button" value="START" />
403 403
             <input type="button" class="btn btn-primary" id="but_start" onclick="document.location = \'' . $protocol . $_SERVER['HTTP_HOST'] . substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/') - 8) . '\'" class="button" style="display: none;" value="Start" />';
404
-	} elseif ($post_step == 7) {
405
-		// Nothong to do
406
-	} else {
407
-		echo '
404
+    } elseif ($post_step == 7) {
405
+        // Nothong to do
406
+    } else {
407
+        echo '
408 408
             <input type="button" id="but_launch" onclick="checkPage(\'step' . $post_step . '\')" class="btn btn-primary" value="START" />
409 409
             <input type="button" id="but_next" target_id="' . (intval($post_step) + 1) . '" class="btn btn-primary" value="NEXT" disabled="disabled">
410 410
 			<input type="button" class="btn btn-primary" id="but_restart" onclick="document.location = \'install.php\'" class="button" value="RESTART" />';
411
-	}
411
+    }
412 412
 
413
-	echo '
413
+    echo '
414 414
         </div>
415 415
 	</form>
416 416
 	</div>';
417 417
 
418
-	//FOOTER
419
-	echo '
418
+    //FOOTER
419
+    echo '
420 420
     <div id="footer">
421 421
         <div style="width:500px; font-size:16px;">
422 422
             ' . TP_TOOL_NAME . ' ' . TP_VERSION . ' <i class="far fa-copyright"></i> copyright 2009-2019
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
         <div style="float:right;margin-top:-15px;">
425 425
         </div>
426 426
     </div>';
427
-	?>
427
+    ?>
428 428
 </body>
429 429
 
430 430
 </html>
Please login to merge, or discard this patch.
install--ASUPPRIMER/upgrade_run_3.0.0_suggestions.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
         $database,
80 80
         $port
81 81
     );
82
-	$db_link->set_charset(DB_ENCODING);
82
+    $db_link->set_charset(DB_ENCODING);
83 83
 } else {
84 84
     $res = "Impossible to get connected to server. Error is: ".addslashes(mysqli_connect_error());
85 85
     echo '[{"finish":"1", "error":"Impossible to get connected to server. Error is: '.addslashes(mysqli_connect_error()).'!"}]';
Please login to merge, or discard this patch.