@@ -136,8 +136,12 @@ |
||
136 | 136 | //if ($user->socid > 0) $socid = $user->socid; |
137 | 137 | //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); |
138 | 138 | //restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); |
139 | -if (empty($conf->hrm->enabled)) accessforbidden(); |
|
140 | -if (!$permissiontoread) accessforbidden(); |
|
139 | +if (empty($conf->hrm->enabled)) { |
|
140 | + accessforbidden(); |
|
141 | +} |
|
142 | +if (!$permissiontoread) { |
|
143 | + accessforbidden(); |
|
144 | +} |
|
141 | 145 | |
142 | 146 | |
143 | 147 | /* |
@@ -136,8 +136,12 @@ |
||
136 | 136 | //if ($user->socid > 0) $socid = $user->socid; |
137 | 137 | //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); |
138 | 138 | //restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); |
139 | -if (empty($conf->hrm->enabled)) accessforbidden(); |
|
140 | -if (!$permissiontoread) accessforbidden(); |
|
139 | +if (empty($conf->hrm->enabled)) { |
|
140 | + accessforbidden(); |
|
141 | +} |
|
142 | +if (!$permissiontoread) { |
|
143 | + accessforbidden(); |
|
144 | +} |
|
141 | 145 | |
142 | 146 | |
143 | 147 | /* |
@@ -136,8 +136,12 @@ |
||
136 | 136 | //if ($user->socid > 0) $socid = $user->socid; |
137 | 137 | //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0); |
138 | 138 | //restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); |
139 | -if (empty($conf->hrm->enabled)) accessforbidden(); |
|
140 | -if (!$permissiontoread) accessforbidden(); |
|
139 | +if (empty($conf->hrm->enabled)) { |
|
140 | + accessforbidden(); |
|
141 | +} |
|
142 | +if (!$permissiontoread) { |
|
143 | + accessforbidden(); |
|
144 | +} |
|
141 | 145 | |
142 | 146 | |
143 | 147 | /* |
@@ -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 | } |
@@ -363,21 +363,30 @@ |
||
363 | 363 | |
364 | 364 | // Page |
365 | 365 | print '<td>'; |
366 | - if ($action != 'edit' || GETPOST('rowid', 'int') != $defaultvalue->id) print $defaultvalue->page; |
|
367 | - else print '<input type="text" name="urlpage" value="'.dol_escape_htmltag($defaultvalue->page).'">'; |
|
366 | + if ($action != 'edit' || GETPOST('rowid', 'int') != $defaultvalue->id) { |
|
367 | + print $defaultvalue->page; |
|
368 | + } else { |
|
369 | + print '<input type="text" name="urlpage" value="'.dol_escape_htmltag($defaultvalue->page).'">'; |
|
370 | + } |
|
368 | 371 | print '</td>'."\n"; |
369 | 372 | |
370 | 373 | // Field |
371 | 374 | print '<td>'; |
372 | - if ($action != 'edit' || GETPOST('rowid') != $defaultvalue->id) print $defaultvalue->param; |
|
373 | - else print '<input type="text" name="key" value="'.dol_escape_htmltag($defaultvalue->param).'">'; |
|
375 | + if ($action != 'edit' || GETPOST('rowid') != $defaultvalue->id) { |
|
376 | + print $defaultvalue->param; |
|
377 | + } else { |
|
378 | + print '<input type="text" name="key" value="'.dol_escape_htmltag($defaultvalue->param).'">'; |
|
379 | + } |
|
374 | 380 | print '</td>'."\n"; |
375 | 381 | |
376 | 382 | // Value |
377 | 383 | if ($mode != 'focus' && $mode != 'mandatory') { |
378 | 384 | print '<td>'; |
379 | - if ($action != 'edit' || GETPOST('rowid') != $defaultvalue->id) print dol_escape_htmltag($defaultvalue->value); |
|
380 | - else print '<input type="text" name="value" value="'.dol_escape_htmltag($defaultvalue->value).'">'; |
|
385 | + if ($action != 'edit' || GETPOST('rowid') != $defaultvalue->id) { |
|
386 | + print dol_escape_htmltag($defaultvalue->value); |
|
387 | + } else { |
|
388 | + print '<input type="text" name="value" value="'.dol_escape_htmltag($defaultvalue->value).'">'; |
|
389 | + } |
|
381 | 390 | print '</td>'; |
382 | 391 | } |
383 | 392 |
@@ -172,7 +172,9 @@ |
||
172 | 172 | // extrafields filter key to make it works |
173 | 173 | $filter['ef.resource'] = $sql; |
174 | 174 | |
175 | -if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); |
|
175 | +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { |
|
176 | + $param .= '&contextpage='.urlencode($contextpage); |
|
177 | +} |
|
176 | 178 | |
177 | 179 | // Add $param from extra fields |
178 | 180 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; |
@@ -118,7 +118,9 @@ |
||
118 | 118 | if (!is_array($Lines) && $Lines<0) { |
119 | 119 | setEventMessages($skilldet->error, $skilldet->errors, 'errors'); |
120 | 120 | } |
121 | - if (empty($Lines)) return $langs->trans('SkillHasNoLines'); |
|
121 | + if (empty($Lines)) { |
|
122 | + return $langs->trans('SkillHasNoLines'); |
|
123 | + } |
|
122 | 124 | |
123 | 125 | $ret = '<!-- field jquery --><span title="'.$langs->trans('NA').'" class="radio_js_bloc_number '.$inputname.'_'.$fk_skill.(empty($selected_rank) ? ' selected' : '').'">0</span>'; |
124 | 126 | if (is_array($Lines) && !empty($Lines)) { |
@@ -84,7 +84,10 @@ |
||
84 | 84 | $db->query($sql); |
85 | 85 | } elseif ($split==0) { // Unsplit line |
86 | 86 | $invoice = new Facture($db); |
87 | - if ($place=="SPLIT") $place="0"; // Avoid move line to the same place (from SPLIT to SPLIT place) |
|
87 | + if ($place=="SPLIT") { |
|
88 | + $place="0"; |
|
89 | + } |
|
90 | + // Avoid move line to the same place (from SPLIT to SPLIT place) |
|
88 | 91 | $ret = $invoice->fetch('', '(PROV-POS'.$_SESSION["takeposterminal"].'-'.$place.')'); |
89 | 92 | if ($ret > 0) { |
90 | 93 | $placeid = $invoice->id; |
@@ -459,8 +459,12 @@ discard block |
||
459 | 459 | |
460 | 460 | |
461 | 461 | $creator_info = $langs->trans("CaseFollowedBy").' '.$tmpuser->getFullName($langs); |
462 | - if ($tmpuser->email) $creator_info .= ', '.$langs->trans("EMail").': '.$tmpuser->email; |
|
463 | - if ($tmpuser->office_phone) $creator_info .= ', '.$langs->trans("Phone").': '.$tmpuser->office_phone; |
|
462 | + if ($tmpuser->email) { |
|
463 | + $creator_info .= ', '.$langs->trans("EMail").': '.$tmpuser->email; |
|
464 | + } |
|
465 | + if ($tmpuser->office_phone) { |
|
466 | + $creator_info .= ', '.$langs->trans("Phone").': '.$tmpuser->office_phone; |
|
467 | + } |
|
464 | 468 | |
465 | 469 | $notetoshow = dol_concatdesc($notetoshow, $creator_info); |
466 | 470 | } |
@@ -1439,7 +1443,9 @@ discard block |
||
1439 | 1443 | global $conf, $langs; |
1440 | 1444 | |
1441 | 1445 | $ltrdirection = 'L'; |
1442 | - if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R'; |
|
1446 | + if ($outputlangs->trans("DIRECTION") == 'rtl') { |
|
1447 | + $ltrdirection = 'R'; |
|
1448 | + } |
|
1443 | 1449 | |
1444 | 1450 | // Load traductions files required by page |
1445 | 1451 | $outputlangs->loadLangs(array("main", "propal", "companies", "bills")); |