@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | $object->fields = dol_sort_array($object->fields, 'position'); |
115 | 115 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
116 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
116 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
117 | 117 | |
118 | 118 | // Access control |
119 | 119 | // TODO Open this page to a given permission so a sale representative can modify change rates. Permission should be added into module multicurrency. |
@@ -560,9 +560,9 @@ discard block |
||
560 | 560 | print '<td class="center">'; |
561 | 561 | print '</td>'; |
562 | 562 | } |
563 | - print '<td><input class="minwidth200" name="dateinput" value="'. date('Y-m-d', dol_stringtotime($obj->date_sync)) .'" type="date"></td>'; |
|
564 | - print '<td>' . $form->selectMultiCurrency($obj->code, 'multicurrency_code', 1, " code != '".$conf->currency."'", true) . '</td>'; |
|
565 | - print '<td><input type="text" min="0" step="any" class="maxwidth100" name="rateinput" value="' . dol_escape_htmltag($obj->rate) . '">'; |
|
563 | + print '<td><input class="minwidth200" name="dateinput" value="'.date('Y-m-d', dol_stringtotime($obj->date_sync)).'" type="date"></td>'; |
|
564 | + print '<td>'.$form->selectMultiCurrency($obj->code, 'multicurrency_code', 1, " code != '".$conf->currency."'", true).'</td>'; |
|
565 | + print '<td><input type="text" min="0" step="any" class="maxwidth100" name="rateinput" value="'.dol_escape_htmltag($obj->rate).'">'; |
|
566 | 566 | print '<input type="hidden" name="page" value="'.dol_escape_htmltag($page).'">'; |
567 | 567 | print '<input type="hidden" name="id_rate" value="'.dol_escape_htmltag($obj->rowid).'">'; |
568 | 568 | print '<button type="submit" class="button small reposition" name="action" value="update">'.$langs->trans("Modify").'</button>'; |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | print ' - <span class="opacitymedium">'.$obj->name.'</span>'; |
609 | 609 | print "</td>\n"; |
610 | 610 | |
611 | - if (! $i) { |
|
611 | + if (!$i) { |
|
612 | 612 | $totalarray['nbfield']++; |
613 | 613 | } |
614 | 614 | } |
@@ -618,7 +618,7 @@ discard block |
||
618 | 618 | print '<td class="tdoverflowmax200">'; |
619 | 619 | print $obj->rate; |
620 | 620 | print "</td>\n"; |
621 | - if (! $i) { |
|
621 | + if (!$i) { |
|
622 | 622 | $totalarray['nbfield']++; |
623 | 623 | } |
624 | 624 | } |
@@ -628,7 +628,7 @@ discard block |
||
628 | 628 | print '<td class="tdoverflowmax200">'; |
629 | 629 | print $obj->rate_indirect; |
630 | 630 | print "</td>\n"; |
631 | - if (! $i) { |
|
631 | + if (!$i) { |
|
632 | 632 | $totalarray['nbfield']++; |
633 | 633 | } |
634 | 634 | } |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | |
637 | 637 | // Fields from hook |
638 | 638 | $parameters = array('arrayfields' => $arrayfields, 'obj' => $obj); |
639 | - $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook |
|
639 | + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook |
|
640 | 640 | print $hookmanager->resPrint; |
641 | 641 | |
642 | 642 | // Action |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | if ($sql) { |
331 | 331 | // Test if the SQL is allowed SQL |
332 | 332 | if ($onlysqltoimportwebsite) { |
333 | - $newsql = str_replace(array("\'"), '__BACKSLASHQUOTE__', $sql); // Replace the \' char |
|
333 | + $newsql = str_replace(array("\'"), '__BACKSLASHQUOTE__', $sql); // Replace the \' char |
|
334 | 334 | |
335 | 335 | // Remove all strings contents including the ' so we can analyse SQL instruction only later |
336 | 336 | $l = strlen($newsql); |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | $extractphpold = ''; |
379 | 379 | |
380 | 380 | // Security analysis |
381 | - $errorphpcheck = checkPHPCode($extractphpold, $extractphp); // Contains the setEventMessages |
|
381 | + $errorphpcheck = checkPHPCode($extractphpold, $extractphp); // Contains the setEventMessages |
|
382 | 382 | if ($errorphpcheck) { |
383 | 383 | $error++; |
384 | 384 | //print 'Request '.($i + 1)." contains non allowed instructions.<br>\n"; |
@@ -560,7 +560,7 @@ discard block |
||
560 | 560 | if ($error == 0) { |
561 | 561 | $ok = 1; |
562 | 562 | } else { |
563 | - $ok = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
563 | + $ok = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
564 | 564 | } |
565 | 565 | |
566 | 566 | return $ok; |
@@ -1088,7 +1088,7 @@ discard block |
||
1088 | 1088 | |
1089 | 1089 | if (preg_match('/dol_login/i', $sessValues) && // limit to dolibarr session |
1090 | 1090 | preg_match('/dol_entity\|s:([0-9]+):"('.$conf->entity.')"/i', $sessValues) && // limit to current entity |
1091 | - preg_match('/dol_company\|s:([0-9]+):"(' . getDolGlobalString('MAIN_INFO_SOCIETE_NOM').')"/i', $sessValues)) { // limit to company name |
|
1091 | + preg_match('/dol_company\|s:([0-9]+):"('.getDolGlobalString('MAIN_INFO_SOCIETE_NOM').')"/i', $sessValues)) { // limit to company name |
|
1092 | 1092 | $tmp = explode('_', $file); |
1093 | 1093 | $idsess = $tmp[1]; |
1094 | 1094 | // We remove session if it's not ourself |
@@ -1892,7 +1892,7 @@ discard block |
||
1892 | 1892 | global $conf, $langs; |
1893 | 1893 | |
1894 | 1894 | $text = $langs->trans("OnlyFollowingModulesAreOpenedToExternalUsers"); |
1895 | - $listofmodules = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')); // List of modules qualified for external user management |
|
1895 | + $listofmodules = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')); // List of modules qualified for external user management |
|
1896 | 1896 | |
1897 | 1897 | $i = 0; |
1898 | 1898 | if (!empty($modules)) { |