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 2 patches
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.
Braces   +15 added lines, -6 removed lines patch added patch discarded remove patch
@@ -191,18 +191,27 @@
 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) {
195
+		    $settingsTxt .= '
195 196
 define("IKEY", "' . IKEY . '");';
196
-		else $settingsTxt .= '
197
+		} else {
198
+		    $settingsTxt .= '
197 199
 define("IKEY", "");';
198
-		if (defined('SKEY') === true) $settingsTxt .= '
200
+		}
201
+		if (defined('SKEY') === true) {
202
+		    $settingsTxt .= '
199 203
 define("SKEY", "' . SKEY . '");';
200
-		else $settingsTxt .= '
204
+		} else {
205
+		    $settingsTxt .= '
201 206
 define("SKEY", "");';
202
-		if (defined('HOST') === true) $settingsTxt .= '
207
+		}
208
+		if (defined('HOST') === true) {
209
+		    $settingsTxt .= '
203 210
 define("HOST", "' . HOST . '");';
204
-		else $settingsTxt .= '
211
+		} else {
212
+		    $settingsTxt .= '
205 213
 define("HOST", "");';
214
+		}
206 215
 
207 216
 
208 217
         $settingsTxt .= '
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/tp.functions.php 1 patch
Braces   +15 added lines, -6 removed lines patch added patch discarded remove patch
@@ -73,18 +73,27 @@
 block discarded – undo
73 73
 define("SECUREPATH", "' . str_replace('\\', '\\\\', SECUREPATH) . '");
74 74
 define("SECUREFILE", "' . SECUREFILE. '");';
75 75
 
76
-        if (defined('IKEY') === true) $settingsTxt .= '
76
+        if (defined('IKEY') === true) {
77
+            $settingsTxt .= '
77 78
 define("IKEY", "' . IKEY . '");';
78
-        else $settingsTxt .= '
79
+        } else {
80
+            $settingsTxt .= '
79 81
 define("IKEY", "");';
80
-        if (defined('SKEY') === true) $settingsTxt .= '
82
+        }
83
+        if (defined('SKEY') === true) {
84
+            $settingsTxt .= '
81 85
 define("SKEY", "' . SKEY . '");';
82
-        else $settingsTxt .= '
86
+        } else {
87
+            $settingsTxt .= '
83 88
 define("SKEY", "");';
84
-        if (defined('HOST') === true) $settingsTxt .= '
89
+        }
90
+        if (defined('HOST') === true) {
91
+            $settingsTxt .= '
85 92
 define("HOST", "' . HOST . '");';
86
-        else $settingsTxt .= '
93
+        } else {
94
+            $settingsTxt .= '
87 95
 define("HOST", "");';
96
+        }
88 97
 
89 98
 
90 99
         $settingsTxt .= '
Please login to merge, or discard this patch.
install--ASUPPRIMER/upgrade_run_3.0.0.php 1 patch
Braces   +9 added lines, -13 removed lines patch added patch discarded remove patch
@@ -130,7 +130,9 @@  discard block
 block discarded – undo
130 130
     $TPIsBranch3 === true ? '' : array('admin', 'ldap_mode', 0, 1), // only disable if migrating from branch 2
131 131
 );
132 132
 foreach ($val as $elem) {
133
-    if ($elem === '') continue;
133
+    if ($elem === '') {
134
+        continue;
135
+    }
134 136
     //Check if exists before inserting
135 137
     $queryRes = mysqli_query(
136 138
         $db_link,
@@ -700,24 +702,21 @@  discard block
 block discarded – undo
700 702
             SET valeur = '".TP_PW_STRENGTH_2."'
701 703
             WHERE increment_id = ".$data['increment_id']
702 704
         );
703
-    }
704
-    elseif ((int) $data['valeur'] > TP_PW_STRENGTH_2 && (int) $data['valeur'] <= TP_PW_STRENGTH_3) {
705
+    } elseif ((int) $data['valeur'] > TP_PW_STRENGTH_2 && (int) $data['valeur'] <= TP_PW_STRENGTH_3) {
705 706
         mysqli_query(
706 707
             $db_link,
707 708
             "UPDATE ".$pre."misc
708 709
             SET valeur = '".TP_PW_STRENGTH_3."'
709 710
             WHERE increment_id = ".$data['increment_id']
710 711
         );
711
-    }
712
-    elseif ((int) $data['valeur'] > TP_PW_STRENGTH_3 && (int) $data['valeur'] <= TP_PW_STRENGTH_4) {
712
+    } elseif ((int) $data['valeur'] > TP_PW_STRENGTH_3 && (int) $data['valeur'] <= TP_PW_STRENGTH_4) {
713 713
         mysqli_query(
714 714
             $db_link,
715 715
             "UPDATE ".$pre."misc
716 716
             SET valeur = '".TP_PW_STRENGTH_4."'
717 717
             WHERE increment_id = ".$data['increment_id']
718 718
         );
719
-    }
720
-    elseif ((int) $data['valeur'] > TP_PW_STRENGTH_4) {
719
+    } elseif ((int) $data['valeur'] > TP_PW_STRENGTH_4) {
721 720
         mysqli_query(
722 721
             $db_link,
723 722
             "UPDATE ".$pre."misc
@@ -741,24 +740,21 @@  discard block
 block discarded – undo
741 740
             SET complexity = '".TP_PW_STRENGTH_2."'
742 741
             WHERE id = ".$data['id']
743 742
         );
744
-    }
745
-    elseif ((int) $data['complexity'] > TP_PW_STRENGTH_2 && (int) $data['complexity'] <= TP_PW_STRENGTH_3) {
743
+    } elseif ((int) $data['complexity'] > TP_PW_STRENGTH_2 && (int) $data['complexity'] <= TP_PW_STRENGTH_3) {
746 744
         mysqli_query(
747 745
             $db_link,
748 746
             "UPDATE ".$pre."roles_title
749 747
             SET complexity = '".TP_PW_STRENGTH_3."'
750 748
             WHERE id = ".$data['id']
751 749
         );
752
-    }
753
-    elseif ((int) $data['complexity'] > TP_PW_STRENGTH_3 && (int) $data['complexity'] <= TP_PW_STRENGTH_4) {
750
+    } elseif ((int) $data['complexity'] > TP_PW_STRENGTH_3 && (int) $data['complexity'] <= TP_PW_STRENGTH_4) {
754 751
         mysqli_query(
755 752
             $db_link,
756 753
             "UPDATE ".$pre."roles_title
757 754
             SET complexity = '".TP_PW_STRENGTH_4."'
758 755
             WHERE id = ".$data['id']
759 756
         );
760
-    }
761
-    elseif ((int) $data['complexity'] > TP_PW_STRENGTH_4) {
757
+    } elseif ((int) $data['complexity'] > TP_PW_STRENGTH_4) {
762 758
         mysqli_query(
763 759
             $db_link,
764 760
             "UPDATE ".$pre."roles_title
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.