@@ -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'; |
@@ -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")); |
@@ -856,7 +856,9 @@ |
||
| 856 | 856 | |
| 857 | 857 | $statusType = 'status'.$status; |
| 858 | 858 | //if ($status == self::STATUS_DISABLED) $statusType = 'status6'; |
| 859 | - if ($status == self::STATUS_ENABLED) $statusType = 'status4'; |
|
| 859 | + if ($status == self::STATUS_ENABLED) { |
|
| 860 | + $statusType = 'status4'; |
|
| 861 | + } |
|
| 860 | 862 | |
| 861 | 863 | return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); |
| 862 | 864 | } |
@@ -240,7 +240,9 @@ |
||
| 240 | 240 | if (empty($nocommentremoval)) { |
| 241 | 241 | $buf = preg_replace('/([,;ERLT\)])\s*--.*$/i', '\1', $buf); //remove comment from a line that not start with -- before add it to the buffer |
| 242 | 242 | } |
| 243 | - if ($buffer) $buffer .= ' '; |
|
| 243 | + if ($buffer) { |
|
| 244 | + $buffer .= ' '; |
|
| 245 | + } |
|
| 244 | 246 | $buffer .= trim($buf); |
| 245 | 247 | } |
| 246 | 248 | |
@@ -61,7 +61,9 @@ |
||
| 61 | 61 | |
| 62 | 62 | // Security check |
| 63 | 63 | $id = GETPOST("id", 'int'); |
| 64 | -if ($user->socid > 0) $socid = $user->socid; |
|
| 64 | +if ($user->socid > 0) { |
|
| 65 | + $socid = $user->socid; |
|
| 66 | +} |
|
| 65 | 67 | $result = restrictedArea($user, 'ticket', $object->id, ''); |
| 66 | 68 | |
| 67 | 69 | // restrict access for externals users |
@@ -115,7 +115,9 @@ |
||
| 115 | 115 | $url_page_current = DOL_URL_ROOT.'/ticket/card.php'; |
| 116 | 116 | |
| 117 | 117 | // Security check - Protection if external user |
| 118 | -if ($user->socid > 0) $socid = $user->socid; |
|
| 118 | +if ($user->socid > 0) { |
|
| 119 | + $socid = $user->socid; |
|
| 120 | +} |
|
| 119 | 121 | $result = restrictedArea($user, 'ticket', $object->id); |
| 120 | 122 | |
| 121 | 123 | $triggermodname = 'TICKET_MODIFY'; |