@@ -79,7 +79,7 @@ |
||
79 | 79 | } |
80 | 80 | $result = restrictedArea($user, 'tax', '', 'tva', 'charges'); |
81 | 81 | |
82 | -$permissiontoadd = $user->rights->tax->charges->creer; // Used by the include of actions_dellink.inc.php |
|
82 | +$permissiontoadd = $user->rights->tax->charges->creer; // Used by the include of actions_dellink.inc.php |
|
83 | 83 | |
84 | 84 | |
85 | 85 | /* |
@@ -69,7 +69,7 @@ |
||
69 | 69 | $upload_dir = $conf->bank->dir_output.'/'.dol_sanitizeFileName($object->id); |
70 | 70 | $modulepart = 'banque'; |
71 | 71 | |
72 | -$permissiontoadd = $user->rights->banque->modifier; // Used by the include of actions_dellink.inc.php |
|
72 | +$permissiontoadd = $user->rights->banque->modifier; // Used by the include of actions_dellink.inc.php |
|
73 | 73 | |
74 | 74 | |
75 | 75 |
@@ -120,7 +120,7 @@ |
||
120 | 120 | $found = true; |
121 | 121 | } |
122 | 122 | |
123 | -$permissiontoadd = $user->rights->banque->modifier; // Used by the include of actions_dellink.inc.php |
|
123 | +$permissiontoadd = $user->rights->banque->modifier; // Used by the include of actions_dellink.inc.php |
|
124 | 124 | |
125 | 125 | |
126 | 126 | /* |
@@ -74,7 +74,7 @@ |
||
74 | 74 | |
75 | 75 | $result = restrictedArea($user, 'banque', $object->id, 'bank_account', '', ''); |
76 | 76 | |
77 | -$permissiontoadd = $user->rights->banque->modifier; // Used by the include of actions_dellink.inc.php |
|
77 | +$permissiontoadd = $user->rights->banque->modifier; // Used by the include of actions_dellink.inc.php |
|
78 | 78 | |
79 | 79 | |
80 | 80 | /* |
@@ -94,7 +94,7 @@ |
||
94 | 94 | } |
95 | 95 | } |
96 | 96 | |
97 | -$permissiontoadd = $user->rights->expensereport->creer; // Used by the include of actions_dellink.inc.php |
|
97 | +$permissiontoadd = $user->rights->expensereport->creer; // Used by the include of actions_dellink.inc.php |
|
98 | 98 | |
99 | 99 | |
100 | 100 | /* |
@@ -128,7 +128,7 @@ |
||
128 | 128 | |
129 | 129 | // Array to add new pages in new tabs |
130 | 130 | $this->tabs = array(); |
131 | - $this->tabs[] = array('data'=>'user:+skill_tab:Skills:hrm:1:/hrm/skill_tab.php?id=__ID__&objecttype=user'); // To add a new tab identified by code tabname1 |
|
131 | + $this->tabs[] = array('data'=>'user:+skill_tab:Skills:hrm:1:/hrm/skill_tab.php?id=__ID__&objecttype=user'); // To add a new tab identified by code tabname1 |
|
132 | 132 | //$this->tabs[] = array('data'=>'job:+tabname1:Poste:mylangfile@hrm:1:/hrm/poste_list.php?fk_job=__ID__'); // To add a new tab identified by code tabname1 |
133 | 133 | // Example: |
134 | 134 | // $this->tabs[] = array('data'=>'objecttype:+tabname1:Title1:mylangfile@hrm:$user->rights->hrm->read:/hrm/mynewtab1.php?id=__ID__'); // To add a new tab identified by code tabname1 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | case 'sellist': |
49 | 49 | $tmp = ''; |
50 | 50 | $tmpparam = jsonOrUnserialize($obj->param); // $tmp may be array 'options' => array 'c_currencies:code_iso:code_iso' => null |
51 | - if (is_array($tmpparam) && array_key_exists('options', $tmpparam) && $tmpparam['options'] && is_array($tmpparam['options'])) { |
|
51 | + if (is_array($tmpparam) && array_key_exists('options', $tmpparam) && $tmpparam['options'] && is_array($tmpparam['options'])) { |
|
52 | 52 | $tmpkeys = array_keys($tmpparam['options']); |
53 | 53 | $tmp = array_shift($tmpkeys); |
54 | 54 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | */ |
139 | 139 | |
140 | 140 | // If we have a hash public (hashp), we guess the original_file. |
141 | -$ecmfile=''; |
|
141 | +$ecmfile = ''; |
|
142 | 142 | if (!empty($hashp)) { |
143 | 143 | include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; |
144 | 144 | $ecmfile = new EcmFiles($db); |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | } |
197 | 197 | |
198 | 198 | // Security: Delete string ../ or ..\ into $original_file |
199 | -$original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..' |
|
199 | +$original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..' |
|
200 | 200 | $original_file = str_replace('../', '/', $original_file); |
201 | 201 | $original_file = str_replace('..\\', '/', $original_file); |
202 | 202 |
@@ -81,7 +81,9 @@ |
||
81 | 81 | $TAllSkills = $static_skill->fetchAll(); |
82 | 82 | if (is_array($TAllSkills)) { |
83 | 83 | foreach ($TAllSkills as &$skill) { |
84 | - if (empty($skill->lines)) $skill->fetchLines(); |
|
84 | + if (empty($skill->lines)) { |
|
85 | + $skill->fetchLines(); |
|
86 | + } |
|
85 | 87 | if (count($skill->lines) < $conf->global->HRM_MAXRANK) { |
86 | 88 | $skill->createSkills(count($skill->lines) + 1); |
87 | 89 | } |
@@ -50,14 +50,14 @@ discard block |
||
50 | 50 | |
51 | 51 | $value = GETPOST('value', 'alpha'); |
52 | 52 | $label = GETPOST('label', 'alpha'); |
53 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
53 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
54 | 54 | |
55 | 55 | $scandir = GETPOST('scan_dir', 'alpha'); |
56 | 56 | $type = 'evaluation'; |
57 | 57 | |
58 | 58 | $arrayofparameters = array( |
59 | - 'HRM_MAXRANK'=>array('type'=>'integer','enabled'=>1), |
|
60 | - 'HRM_DEFAULT_SKILL_DESCRIPTION'=>array('type'=>'varchar','enabled'=>1), |
|
59 | + 'HRM_MAXRANK'=>array('type'=>'integer', 'enabled'=>1), |
|
60 | + 'HRM_DEFAULT_SKILL_DESCRIPTION'=>array('type'=>'varchar', 'enabled'=>1), |
|
61 | 61 | ); |
62 | 62 | |
63 | 63 | $error = 0; |
@@ -483,27 +483,27 @@ discard block |
||
483 | 483 | print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>'; |
484 | 484 | |
485 | 485 | foreach ($arrayofparameters as $constname => $val) { |
486 | - if ($val['enabled']==1) { |
|
486 | + if ($val['enabled'] == 1) { |
|
487 | 487 | $setupnotempty++; |
488 | 488 | print '<tr class="oddeven"><td>'; |
489 | - $tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : ''); |
|
489 | + $tooltiphelp = (($langs->trans($constname.'Tooltip') != $constname.'Tooltip') ? $langs->trans($constname.'Tooltip') : ''); |
|
490 | 490 | print '<span id="helplink'.$constname.'" class="spanforparamtooltip">'.$form->textwithpicto($langs->trans($constname), $tooltiphelp, 1, 'info', '', 0, 3, 'tootips'.$constname).'</span>'; |
491 | 491 | print '</td><td>'; |
492 | 492 | |
493 | 493 | if ($val['type'] == 'textarea') { |
494 | - print '<textarea class="flat" name="' . $constname . '" id="' . $constname . '" cols="50" rows="5" wrap="soft">' . "\n"; |
|
494 | + print '<textarea class="flat" name="'.$constname.'" id="'.$constname.'" cols="50" rows="5" wrap="soft">'."\n"; |
|
495 | 495 | print getDolGlobalString($constname); |
496 | 496 | print "</textarea>\n"; |
497 | 497 | } elseif ($val['type'] == 'integer') { |
498 | - print '<input class="flat" name="' . $constname . '" id="' . $constname . '" value="' . getDolGlobalString($constname) . '" type="number" step="1" min="0" max="50" >' . "\n"; |
|
498 | + print '<input class="flat" name="'.$constname.'" id="'.$constname.'" value="'.getDolGlobalString($constname).'" type="number" step="1" min="0" max="50" >'."\n"; |
|
499 | 499 | } elseif ($val['type'] == 'html') { |
500 | - require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; |
|
500 | + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; |
|
501 | 501 | $doleditor = new DolEditor($constname, getDolGlobalString($constname), '', 160, 'dolibarr_notes', '', false, false, isModEnabled('fckeditor'), ROWS_5, '90%'); |
502 | 502 | $doleditor->Create(); |
503 | 503 | } elseif ($val['type'] == 'yesno') { |
504 | 504 | print $form->selectyesno($constname, getDolGlobalString($constname), 1); |
505 | 505 | } elseif (preg_match('/emailtemplate:/', $val['type'])) { |
506 | - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php'; |
|
506 | + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; |
|
507 | 507 | $formmail = new FormMail($db); |
508 | 508 | |
509 | 509 | $tmp = explode(':', $val['type']); |
@@ -515,10 +515,10 @@ discard block |
||
515 | 515 | //var_dump($modelmail); |
516 | 516 | $moreonlabel = ''; |
517 | 517 | if (!empty($arrayofmessagename[$modelmail->label])) { |
518 | - $moreonlabel = ' <span class="opacitymedium">(' . $langs->trans("SeveralLangugeVariatFound") . ')</span>'; |
|
518 | + $moreonlabel = ' <span class="opacitymedium">('.$langs->trans("SeveralLangugeVariatFound").')</span>'; |
|
519 | 519 | } |
520 | 520 | // The 'label' is the key that is unique if we exclude the language |
521 | - $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)) . $moreonlabel; |
|
521 | + $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)).$moreonlabel; |
|
522 | 522 | } |
523 | 523 | } |
524 | 524 | print $form->selectarray($constname, $arrayofmessagename, getDolGlobalString($constname), 'None', 0, 0, '', 0, 0, 0, '', '', 1); |
@@ -531,25 +531,25 @@ discard block |
||
531 | 531 | print img_picto('', 'category', 'class="pictofixedwidth"'); |
532 | 532 | print $formother->select_categories($tmp[1], getDolGlobalString($constname), $constname, 0, $langs->trans('CustomersProspectsCategoriesShort')); |
533 | 533 | } elseif (preg_match('/thirdparty_type/', $val['type'])) { |
534 | - require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; |
|
534 | + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; |
|
535 | 535 | $formcompany = new FormCompany($db); |
536 | 536 | print $formcompany->selectProspectCustomerType(getDolGlobalString($constname), $constname); |
537 | 537 | } elseif ($val['type'] == 'securekey') { |
538 | - print '<input required="required" type="text" class="flat" id="' . $constname . '" name="' . $constname . '" value="' . (GETPOST($constname, 'alpha') ? GETPOST($constname, 'alpha') : getDolGlobalString($constname)) . '" size="40">'; |
|
538 | + print '<input required="required" type="text" class="flat" id="'.$constname.'" name="'.$constname.'" value="'.(GETPOST($constname, 'alpha') ? GETPOST($constname, 'alpha') : getDolGlobalString($constname)).'" size="40">'; |
|
539 | 539 | if (!empty($conf->use_javascript_ajax)) { |
540 | - print ' ' . img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token' . $constname . '" class="linkobject"'); |
|
540 | + print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token'.$constname.'" class="linkobject"'); |
|
541 | 541 | } |
542 | 542 | |
543 | 543 | // Add button to autosuggest a key |
544 | - include_once DOL_DOCUMENT_ROOT . '/core/lib/security2.lib.php'; |
|
545 | - print dolJSToSetRandomPassword($constname, 'generate_token' . $constname); |
|
544 | + include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; |
|
545 | + print dolJSToSetRandomPassword($constname, 'generate_token'.$constname); |
|
546 | 546 | } elseif ($val['type'] == 'product') { |
547 | 547 | if (isModEnabled('product') || isModEnabled('service')) { |
548 | 548 | $selected = (empty($conf->global->$constname) ? '' : $conf->global->$constname); |
549 | 549 | $form->select_produits($selected, $constname, '', 0); |
550 | 550 | } |
551 | 551 | } else { |
552 | - print '<input name="' . $constname . '" class="flat ' . (empty($val['css']) ? 'minwidth200' : $val['css']) . '" value="' . getDolGlobalString($constname) . '">'; |
|
552 | + print '<input name="'.$constname.'" class="flat '.(empty($val['css']) ? 'minwidth200' : $val['css']).'" value="'.getDolGlobalString($constname).'">'; |
|
553 | 553 | } |
554 | 554 | print '</td></tr>'; |
555 | 555 | } |
@@ -568,27 +568,27 @@ discard block |
||
568 | 568 | print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>'; |
569 | 569 | |
570 | 570 | foreach ($arrayofparameters as $constname => $val) { |
571 | - if ($val['enabled']==1) { |
|
571 | + if ($val['enabled'] == 1) { |
|
572 | 572 | $setupnotempty++; |
573 | 573 | print '<tr class="oddeven"><td>'; |
574 | - $tooltiphelp = (($langs->trans($constname . 'Tooltip') != $constname . 'Tooltip') ? $langs->trans($constname . 'Tooltip') : ''); |
|
574 | + $tooltiphelp = (($langs->trans($constname.'Tooltip') != $constname.'Tooltip') ? $langs->trans($constname.'Tooltip') : ''); |
|
575 | 575 | print $form->textwithpicto($langs->trans($constname), $tooltiphelp); |
576 | 576 | print '</td><td>'; |
577 | 577 | |
578 | 578 | if ($val['type'] == 'textarea') { |
579 | 579 | print dol_nl2br(getDolGlobalString($constname)); |
580 | - } elseif ($val['type']== 'html') { |
|
580 | + } elseif ($val['type'] == 'html') { |
|
581 | 581 | print getDolGlobalString($constname); |
582 | 582 | } elseif ($val['type'] == 'yesno') { |
583 | 583 | print ajax_constantonoff($constname); |
584 | 584 | } elseif (preg_match('/emailtemplate:/', $val['type'])) { |
585 | - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php'; |
|
585 | + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; |
|
586 | 586 | $formmail = new FormMail($db); |
587 | 587 | |
588 | 588 | $tmp = explode(':', $val['type']); |
589 | 589 | |
590 | 590 | $template = $formmail->getEMailTemplate($db, $tmp[1], $user, $langs, getDolGlobalString($constname)); |
591 | - if ($template<0) { |
|
591 | + if ($template < 0) { |
|
592 | 592 | setEventMessages(null, $formmail->errors, 'errors'); |
593 | 593 | } |
594 | 594 | print $langs->trans($template->label); |
@@ -601,9 +601,9 @@ discard block |
||
601 | 601 | $ways = $c->print_all_ways(' >> ', 'none', 0, 1); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formated text |
602 | 602 | $toprint = array(); |
603 | 603 | foreach ($ways as $way) { |
604 | - $toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ? ' style="background: #' . $c->color . ';"' : ' style="background: #bbb"') . '>' . $way . '</li>'; |
|
604 | + $toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"'.($c->color ? ' style="background: #'.$c->color.';"' : ' style="background: #bbb"').'>'.$way.'</li>'; |
|
605 | 605 | } |
606 | - print '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>'; |
|
606 | + print '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>'; |
|
607 | 607 | } elseif (preg_match('/thirdparty_type/', $val['type'])) { |
608 | 608 | if (getDolGlobalString($constname) == 2) { |
609 | 609 | print $langs->trans("Prospect"); |