@@ -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 |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | return $this->LibType($this->nature, $mode); |
338 | 338 | } |
339 | 339 | |
340 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
340 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
341 | 341 | /** |
342 | 342 | * Return type of an accounting journal |
343 | 343 | * |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | */ |
348 | 348 | public function LibType($nature, $mode = 0) |
349 | 349 | { |
350 | - // phpcs:enable |
|
350 | + // phpcs:enable |
|
351 | 351 | global $langs; |
352 | 352 | |
353 | 353 | $langs->loadLangs(array("accountancy")); |
@@ -2545,14 +2545,14 @@ |
||
2545 | 2545 | } |
2546 | 2546 | |
2547 | 2547 | /** |
2548 | - * Export format : iSuite Expert |
|
2549 | - * |
|
2550 | - * by OpenSolus [https://opensolus.fr] |
|
2551 | - * |
|
2548 | + * Export format : iSuite Expert |
|
2549 | + * |
|
2550 | + * by OpenSolus [https://opensolus.fr] |
|
2551 | + * |
|
2552 | 2552 | * @param array $objectLines data |
2553 | 2553 | * @param resource $exportFile [=null] File resource to export or print if null |
2554 | 2554 | * @return void |
2555 | - */ |
|
2555 | + */ |
|
2556 | 2556 | public function exportiSuiteExpert($objectLines, $exportFile = null) |
2557 | 2557 | { |
2558 | 2558 | $separator = ';'; |
@@ -1987,7 +1987,7 @@ discard block |
||
1987 | 1987 | return 1; |
1988 | 1988 | } |
1989 | 1989 | |
1990 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1990 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1991 | 1991 | /** |
1992 | 1992 | * Export bookkeeping |
1993 | 1993 | * |
@@ -1996,7 +1996,7 @@ discard block |
||
1996 | 1996 | */ |
1997 | 1997 | public function export_bookkeeping($model = 'ebp') |
1998 | 1998 | { |
1999 | - // phpcs:enable |
|
1999 | + // phpcs:enable |
|
2000 | 2000 | global $conf; |
2001 | 2001 | |
2002 | 2002 | $sql = "SELECT rowid, doc_date, doc_type,"; |
@@ -2180,7 +2180,7 @@ discard block |
||
2180 | 2180 | */ |
2181 | 2181 | } |
2182 | 2182 | |
2183 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2183 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2184 | 2184 | /** |
2185 | 2185 | * Return list of accounts with label by chart of accounts |
2186 | 2186 | * |
@@ -2195,7 +2195,7 @@ discard block |
||
2195 | 2195 | */ |
2196 | 2196 | public function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $aabase = '') |
2197 | 2197 | { |
2198 | - // phpcs:enable |
|
2198 | + // phpcs:enable |
|
2199 | 2199 | global $conf; |
2200 | 2200 | |
2201 | 2201 | require_once constant('DOL_DOCUMENT_ROOT') . '/core/lib/accounting.lib.php'; |
@@ -2292,7 +2292,7 @@ discard block |
||
2292 | 2292 | } |
2293 | 2293 | } |
2294 | 2294 | |
2295 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2295 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2296 | 2296 | /** |
2297 | 2297 | * Description of accounting account |
2298 | 2298 | * |
@@ -2301,7 +2301,7 @@ discard block |
||
2301 | 2301 | */ |
2302 | 2302 | public function get_compte_desc($account = null) |
2303 | 2303 | { |
2304 | - // phpcs:enable |
|
2304 | + // phpcs:enable |
|
2305 | 2305 | global $conf; |
2306 | 2306 | |
2307 | 2307 | $pcgver = getDolGlobalInt('CHARTOFACCOUNTS'); |