Passed
Push — main ( 0b1fab...8c9781 )
by Rafael
49:58
created
public/htdocs/install/fileconf.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -505,14 +505,14 @@  discard block
 block discarded – undo
505 505
                            id="db_pass" autocomplete="off"
506 506
                            name="db_pass"
507 507
                            value="<?php
508
-                           // If $force_install_databasepass is on, we don't want to set password, we just show '***'. Real value will be extracted from the forced install file at step1.
509
-                           // @phan-suppress-next-line PhanParamSuspiciousOrder
510
-                           $autofill = ((!empty($_SESSION['dol_save_pass'])) ? $_SESSION['dol_save_pass'] : str_pad('', strlen($force_install_databasepass), '*'));
511
-                           if (!empty($dolibarr_main_prod) && empty($_SESSION['dol_save_pass'])) {    // So value can't be found if install page still accessible
512
-                               $autofill = '';
513
-                           }
514
-                           print dol_escape_htmltag($autofill);
515
-                           ?>"
508
+                            // If $force_install_databasepass is on, we don't want to set password, we just show '***'. Real value will be extracted from the forced install file at step1.
509
+                            // @phan-suppress-next-line PhanParamSuspiciousOrder
510
+                            $autofill = ((!empty($_SESSION['dol_save_pass'])) ? $_SESSION['dol_save_pass'] : str_pad('', strlen($force_install_databasepass), '*'));
511
+                            if (!empty($dolibarr_main_prod) && empty($_SESSION['dol_save_pass'])) {    // So value can't be found if install page still accessible
512
+                                $autofill = '';
513
+                            }
514
+                            print dol_escape_htmltag($autofill);
515
+                            ?>"
516 516
                         <?php if (($force_install_noedit == 2 || $force_install_noedit == 3) && $force_install_databasepass !== null) {
517 517
                             print ' disabled';
518 518
                         } ?>
@@ -591,23 +591,23 @@  discard block
 block discarded – undo
591 591
                            name="db_pass_root"
592 592
                            class="needroot text-security"
593 593
                            value="<?php
594
-                           // If $force_install_databaserootpass is on, we don't want to set password here, we just show '***'. Real value will be extracted from the forced install file at step1.
595
-                           // @phan-suppress-next-line PhanParamSuspiciousOrder
596
-                           $autofill = ((!empty($force_install_databaserootpass)) ? str_pad('', strlen($force_install_databaserootpass), '*') : (isset($db_pass_root) ? $db_pass_root : ''));
597
-                           if (!empty($dolibarr_main_prod)) {
598
-                               $autofill = '';
599
-                           }
600
-                           // Do not autofill password if instance is a production instance
601
-                           if (
602
-                               !empty($_SERVER["SERVER_NAME"]) && !in_array(
603
-                                   $_SERVER["SERVER_NAME"],
604
-                                   array('127.0.0.1', 'localhost', 'localhostgit')
605
-                               )
606
-                           ) {
607
-                               $autofill = '';
608
-                           }    // Do not autofill password for remote access
609
-                           print dol_escape_htmltag($autofill);
610
-                           ?>"
594
+                            // If $force_install_databaserootpass is on, we don't want to set password here, we just show '***'. Real value will be extracted from the forced install file at step1.
595
+                            // @phan-suppress-next-line PhanParamSuspiciousOrder
596
+                            $autofill = ((!empty($force_install_databaserootpass)) ? str_pad('', strlen($force_install_databaserootpass), '*') : (isset($db_pass_root) ? $db_pass_root : ''));
597
+                            if (!empty($dolibarr_main_prod)) {
598
+                                $autofill = '';
599
+                            }
600
+                            // Do not autofill password if instance is a production instance
601
+                            if (
602
+                                !empty($_SERVER["SERVER_NAME"]) && !in_array(
603
+                                    $_SERVER["SERVER_NAME"],
604
+                                    array('127.0.0.1', 'localhost', 'localhostgit')
605
+                                )
606
+                            ) {
607
+                                $autofill = '';
608
+                            }    // Do not autofill password for remote access
609
+                            print dol_escape_htmltag($autofill);
610
+                            ?>"
611 611
                         <?php if ($force_install_noedit > 0 && !empty($force_install_databaserootpass)) {
612 612
                             print ' disabled'; /* May be removed by javascript*/
613 613
                         } ?>
Please login to merge, or discard this patch.