@@ -190,7 +190,9 @@ discard block |
||
| 190 | 190 | |
| 191 | 191 | if (($action == 'add' || ($action == 'update' && $object->status < Ticket::STATUS_CLOSED)) && $permissiontoadd) { |
| 192 | 192 | $ifErrorAction = $action == 'add' ? 'create' : 'edit'; |
| 193 | - if ($action == 'add') $object->track_id = null; |
|
| 193 | + if ($action == 'add') { |
|
| 194 | + $object->track_id = null; |
|
| 195 | + } |
|
| 194 | 196 | $error = 0; |
| 195 | 197 | |
| 196 | 198 | $fieldsToCheck = [ |
@@ -342,7 +344,9 @@ discard block |
||
| 342 | 344 | $db->rollback(); |
| 343 | 345 | setEventMessages($object->error, $object->errors, 'errors'); |
| 344 | 346 | } |
| 345 | - } else $action = $ifErrorAction; |
|
| 347 | + } else { |
|
| 348 | + $action = $ifErrorAction; |
|
| 349 | + } |
|
| 346 | 350 | } |
| 347 | 351 | |
| 348 | 352 | // Mark as Read |
@@ -234,7 +234,9 @@ |
||
| 234 | 234 | print '<form method="POST" '.($withdolfichehead ? '' : 'style="margin-bottom: 30px;" ').'name="ticket" id="form_create_ticket" enctype="multipart/form-data" action="'.(!empty($this->param["returnurl"]) ? $this->param["returnurl"] : $_SERVER['PHP_SELF']).'">'; |
| 235 | 235 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
| 236 | 236 | print '<input type="hidden" name="action" value="'.$this->action.'">'; |
| 237 | - if (!empty($object->id)) print '<input type="hidden" name="id" value="'. $object->id .'">'; |
|
| 237 | + if (!empty($object->id)) { |
|
| 238 | + print '<input type="hidden" name="id" value="'. $object->id .'">'; |
|
| 239 | + } |
|
| 238 | 240 | print '<input type="hidden" name="trackid" value="'.$this->trackid.'">'; |
| 239 | 241 | foreach ($this->param as $key => $value) { |
| 240 | 242 | print '<input type="hidden" name="'.$key.'" value="'.$value.'">'; |
@@ -108,7 +108,9 @@ |
||
| 108 | 108 | break; |
| 109 | 109 | } |
| 110 | 110 | } |
| 111 | - if ($posy != 0 ) $poscursor['y'] = $posy; |
|
| 111 | + if ($posy != 0 ) { |
|
| 112 | + $poscursor['y'] = $posy; |
|
| 113 | + } |
|
| 112 | 114 | } |
| 113 | 115 | |
| 114 | 116 | // Define some properties |
@@ -2660,6 +2660,8 @@ |
||
| 2660 | 2660 | $this->dictionaries['tab'.$field][] = $dictionaryArray[$field]; |
| 2661 | 2661 | } |
| 2662 | 2662 | } |
| 2663 | - if ($langs && !in_array($langs, $this->dictionaries[$langs])) $this->dictionaries['langs'][] = $langs; |
|
| 2663 | + if ($langs && !in_array($langs, $this->dictionaries[$langs])) { |
|
| 2664 | + $this->dictionaries['langs'][] = $langs; |
|
| 2665 | + } |
|
| 2664 | 2666 | } |
| 2665 | 2667 | } |
@@ -441,8 +441,10 @@ |
||
| 441 | 441 | ); |
| 442 | 442 | if ($result > 0) { |
| 443 | 443 | $lineid = $result; |
| 444 | - if (!empty($createbills_onebythird)) //increment rang to keep sending |
|
| 444 | + if (!empty($createbills_onebythird)) { |
|
| 445 | + //increment rang to keep sending |
|
| 445 | 446 | $TFactThirdNbLines[$expd->socid]++; |
| 447 | + } |
|
| 446 | 448 | } else { |
| 447 | 449 | $lineid = 0; |
| 448 | 450 | $error++; |
@@ -1429,7 +1429,9 @@ |
||
| 1429 | 1429 | $deliverableQty = min($quantityToBeDelivered, $batchStock); |
| 1430 | 1430 | } |
| 1431 | 1431 | |
| 1432 | - if ($deliverableQty < 0) $deliverableQty = 0; |
|
| 1432 | + if ($deliverableQty < 0) { |
|
| 1433 | + $deliverableQty = 0; |
|
| 1434 | + } |
|
| 1433 | 1435 | |
| 1434 | 1436 | $inputName = 'qtyl'.$indiceAsked.'_'.$subj; |
| 1435 | 1437 | if (GETPOSTISSET($inputName)) { |
@@ -97,8 +97,9 @@ |
||
| 97 | 97 | $main_data_dir = $argv[4]; // override when executing the script in command line |
| 98 | 98 | } |
| 99 | 99 | // In mode 3 the main_url is custom |
| 100 | - if ($force_install_noedit != 3) |
|
| 101 | - $main_url = detect_dolibarr_main_url_root(); |
|
| 100 | + if ($force_install_noedit != 3) { |
|
| 101 | + $main_url = detect_dolibarr_main_url_root(); |
|
| 102 | + } |
|
| 102 | 103 | if (!empty($argv[5])) { |
| 103 | 104 | $main_url = $argv[5]; // override when executing the script in command line |
| 104 | 105 | } |
@@ -316,11 +316,15 @@ |
||
| 316 | 316 | $resql = $this->db->query($sql); |
| 317 | 317 | if ($resql) { |
| 318 | 318 | while ($obj = $this->db->fetch_object($resql)) { |
| 319 | - if (empty($obj->lettering_code)) continue; |
|
| 319 | + if (empty($obj->lettering_code)) { |
|
| 320 | + continue; |
|
| 321 | + } |
|
| 320 | 322 | |
| 321 | 323 | // Remove normal lettering code if set partial lettering |
| 322 | 324 | if ($partial && preg_match('/^[A-Z]+$/', $obj->lettering_code)) { |
| 323 | - if (!empty($obj->bookkeeping_ids)) $ids = array_diff($ids, explode(',', $obj->bookkeeping_ids)); |
|
| 325 | + if (!empty($obj->bookkeeping_ids)) { |
|
| 326 | + $ids = array_diff($ids, explode(',', $obj->bookkeeping_ids)); |
|
| 327 | + } |
|
| 324 | 328 | } elseif (!$partial && preg_match('/^[a-z]+$/', $obj->lettering_code)) { |
| 325 | 329 | // Delete partial lettering code if set normal lettering |
| 326 | 330 | $sql2 = "UPDATE " . MAIN_DB_PREFIX . "accounting_bookkeeping SET"; |
@@ -87,7 +87,9 @@ |
||
| 87 | 87 | $return ++; |
| 88 | 88 | } elseif ((int) $line->fk_product > 0) { |
| 89 | 89 | if ($product->fetch($line->fk_product) > 0) { |
| 90 | - if ($product->status_buy) $return ++; |
|
| 90 | + if ($product->status_buy) { |
|
| 91 | + $return ++; |
|
| 92 | + } |
|
| 91 | 93 | } |
| 92 | 94 | } |
| 93 | 95 | } |