@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | } |
91 | 91 | |
92 | 92 | |
93 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
93 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
94 | 94 | /** |
95 | 95 | * This is the main function that returns the array of emails |
96 | 96 | * |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | public function add_to_target($mailing_id) |
101 | 101 | { |
102 | - // phpcs:enable |
|
102 | + // phpcs:enable |
|
103 | 103 | $target = array(); |
104 | 104 | $j = 0; |
105 | 105 |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | |
343 | 343 | |
344 | 344 | |
345 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
345 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
346 | 346 | /** |
347 | 347 | * Clean sensible object datas |
348 | 348 | * |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | */ |
352 | 352 | protected function _cleanObjectDatas($object) |
353 | 353 | { |
354 | - // phpcs:enable |
|
354 | + // phpcs:enable |
|
355 | 355 | $object = parent::_cleanObjectDatas($object); |
356 | 356 | |
357 | 357 | unset($object->rowid); |
@@ -966,7 +966,7 @@ |
||
966 | 966 | /** |
967 | 967 | * @var array $suffix2numAsked map HTTP query parameter suffixes (like '1_0') to line indices so that |
968 | 968 | * extrafields from HTTP query can be assigned to the correct dispatch line |
969 | - */ |
|
969 | + */ |
|
970 | 970 | $suffix2numAsked = array(); |
971 | 971 | $dispatchLines = array(); |
972 | 972 |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | } |
177 | 177 | |
178 | 178 | |
179 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
179 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
180 | 180 | /** |
181 | 181 | * Function to build pdf onto disk |
182 | 182 | * |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | */ |
191 | 191 | public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) |
192 | 192 | { |
193 | - // phpcs:enable |
|
193 | + // phpcs:enable |
|
194 | 194 | global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines; |
195 | 195 | global $action; |
196 | 196 | |
@@ -643,7 +643,7 @@ discard block |
||
643 | 643 | } |
644 | 644 | } |
645 | 645 | |
646 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
646 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
647 | 647 | /** |
648 | 648 | * Return list of active generation modules |
649 | 649 | * |
@@ -653,11 +653,11 @@ discard block |
||
653 | 653 | */ |
654 | 654 | public static function liste_modeles($db, $maxfilenamelength = 0) |
655 | 655 | { |
656 | - // phpcs:enable |
|
656 | + // phpcs:enable |
|
657 | 657 | return parent::liste_modeles($db, $maxfilenamelength); // TODO: Change the autogenerated stub |
658 | 658 | } |
659 | 659 | |
660 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
660 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
661 | 661 | /** |
662 | 662 | * Show table for lines |
663 | 663 | * |
@@ -709,7 +709,7 @@ discard block |
||
709 | 709 | } |
710 | 710 | } |
711 | 711 | |
712 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
712 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
713 | 713 | /** |
714 | 714 | * Show top header of page. |
715 | 715 | * |
@@ -951,7 +951,7 @@ discard block |
||
951 | 951 | return $top_shift; |
952 | 952 | } |
953 | 953 | |
954 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
954 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
955 | 955 | /** |
956 | 956 | * Show footer of page. Need this->emetteur object |
957 | 957 | * |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | return $texte; |
207 | 207 | } |
208 | 208 | |
209 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
209 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
210 | 210 | /** |
211 | 211 | * Function to build a document on disk using the generic odt module. |
212 | 212 | * |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | */ |
221 | 221 | public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) |
222 | 222 | { |
223 | - // phpcs:enable |
|
223 | + // phpcs:enable |
|
224 | 224 | global $user, $langs, $conf, $mysoc, $hookmanager; |
225 | 225 | global $action; |
226 | 226 |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | return $object; |
74 | 74 | } |
75 | 75 | |
76 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
76 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
77 | 77 | /** |
78 | 78 | * Set content of ->tpl array, to use into template |
79 | 79 | * |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | */ |
84 | 84 | public function assign_values(&$action, $id) |
85 | 85 | { |
86 | - // phpcs:enable |
|
86 | + // phpcs:enable |
|
87 | 87 | global $conf, $langs, $user, $canvas; |
88 | 88 | global $form, $formcompany, $objsoc; |
89 | 89 | |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | } |
239 | 239 | } |
240 | 240 | |
241 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
241 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
242 | 242 | /** |
243 | 243 | * Assign POST values into object |
244 | 244 | * |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | */ |
247 | 247 | private function assign_post() |
248 | 248 | { |
249 | - // phpcs:enable |
|
249 | + // phpcs:enable |
|
250 | 250 | global $langs, $mysoc; |
251 | 251 | |
252 | 252 | $this->object->old_name = GETPOST("old_name"); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | return $out; |
75 | 75 | } |
76 | 76 | |
77 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
77 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
78 | 78 | /** |
79 | 79 | * Assign custom values for canvas |
80 | 80 | * |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function assign_values(&$action, $id) |
86 | 86 | { |
87 | - // phpcs:enable |
|
87 | + // phpcs:enable |
|
88 | 88 | global $conf, $db, $langs, $user; |
89 | 89 | global $form; |
90 | 90 |
@@ -505,14 +505,14 @@ discard block |
||
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 |
||
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 | } ?> |
@@ -513,7 +513,7 @@ discard block |
||
513 | 513 | } |
514 | 514 | } |
515 | 515 | |
516 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
516 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
517 | 517 | /** |
518 | 518 | * Load array lines |
519 | 519 | * |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | */ |
523 | 523 | public function fetch_lines($filters = '') |
524 | 524 | { |
525 | - // phpcs:enable |
|
525 | + // phpcs:enable |
|
526 | 526 | global $langs; |
527 | 527 | |
528 | 528 | $this->lines = array(); |
@@ -1242,7 +1242,7 @@ discard block |
||
1242 | 1242 | return $this->LibStatut(0, $mode); |
1243 | 1243 | } |
1244 | 1244 | |
1245 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1245 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1246 | 1246 | /** |
1247 | 1247 | * Return label of a status |
1248 | 1248 | * |
@@ -1252,7 +1252,7 @@ discard block |
||
1252 | 1252 | */ |
1253 | 1253 | public function LibStatut($status, $mode = 1) |
1254 | 1254 | { |
1255 | - // phpcs:enable |
|
1255 | + // phpcs:enable |
|
1256 | 1256 | return ''; |
1257 | 1257 | } |
1258 | 1258 |