@@ -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'; |
@@ -2264,8 +2264,9 @@ |
||
2264 | 2264 | |
2265 | 2265 | if (!$changelater) { |
2266 | 2266 | $url = $urlwithroot.'/'; |
2267 | - if (!empty($conf->global->URL_REDIRECTION_AFTER_CHANGEPASSWORD)) |
|
2268 | - $url = $conf->global->URL_REDIRECTION_AFTER_CHANGEPASSWORD; |
|
2267 | + if (!empty($conf->global->URL_REDIRECTION_AFTER_CHANGEPASSWORD)) { |
|
2268 | + $url = $conf->global->URL_REDIRECTION_AFTER_CHANGEPASSWORD; |
|
2269 | + } |
|
2269 | 2270 | $mesg .= $outputlangs->transnoentitiesnoconv("RequestToResetPasswordReceived").".\n"; |
2270 | 2271 | $mesg .= $outputlangs->transnoentitiesnoconv("NewKeyIs")." :\n\n"; |
2271 | 2272 | $mesg .= $outputlangs->transnoentitiesnoconv("Login")." = ".$this->login."\n"; |
@@ -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")); |
@@ -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 | } |
@@ -684,7 +684,9 @@ |
||
684 | 684 | print $bankstatic->getNomUrl(1); |
685 | 685 | } |
686 | 686 | print '</td>'; |
687 | - if (!$i) $totalarray['nbfield']++; |
|
687 | + if (!$i) { |
|
688 | + $totalarray['nbfield']++; |
|
689 | + } |
|
688 | 690 | } |
689 | 691 | |
690 | 692 | // Amount |
@@ -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 |