@@ -99,8 +99,9 @@ |
||
99 | 99 | $main_data_dir = $argv[4]; // override when executing the script in command line |
100 | 100 | } |
101 | 101 | // In mode 3 the main_url is custom |
102 | - if ($force_install_noedit != 3) |
|
103 | - $main_url = detect_dolibarr_main_url_root(); |
|
102 | + if ($force_install_noedit != 3) { |
|
103 | + $main_url = detect_dolibarr_main_url_root(); |
|
104 | + } |
|
104 | 105 | if (!empty($argv[5])) { |
105 | 106 | $main_url = $argv[5]; // override when executing the script in command line |
106 | 107 | } |
@@ -192,7 +192,9 @@ discard block |
||
192 | 192 | |
193 | 193 | if (($action == 'add' || ($action == 'update' && $object->status < Ticket::STATUS_CLOSED)) && $permissiontoadd) { |
194 | 194 | $ifErrorAction = $action == 'add' ? 'create' : 'edit'; |
195 | - if ($action == 'add') $object->track_id = null; |
|
195 | + if ($action == 'add') { |
|
196 | + $object->track_id = null; |
|
197 | + } |
|
196 | 198 | $error = 0; |
197 | 199 | |
198 | 200 | $fieldsToCheck = [ |
@@ -344,7 +346,9 @@ discard block |
||
344 | 346 | $db->rollback(); |
345 | 347 | setEventMessages($object->error, $object->errors, 'errors'); |
346 | 348 | } |
347 | - } else $action = $ifErrorAction; |
|
349 | + } else { |
|
350 | + $action = $ifErrorAction; |
|
351 | + } |
|
348 | 352 | } |
349 | 353 | |
350 | 354 | // Mark as Read |
@@ -49,7 +49,9 @@ |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | // Not sure this is required |
52 | -if (isset($_SESSION['webportal_logged_thirdparty_account_id'])) unset($_SESSION['webportal_logged_thirdparty_account_id']); |
|
52 | +if (isset($_SESSION['webportal_logged_thirdparty_account_id'])) { |
|
53 | + unset($_SESSION['webportal_logged_thirdparty_account_id']); |
|
54 | +} |
|
53 | 55 | |
54 | 56 | if (GETPOST('noredirect')) { |
55 | 57 | return; |
@@ -467,13 +467,23 @@ |
||
467 | 467 | if ($this->product->multiprices_base_type[$key] != $oldproduct->multiprices_base_type[$key]) { |
468 | 468 | $pricemodified = true; |
469 | 469 | } else { |
470 | - if ($this->product->multiprices_tva_tx[$key] != $oldproduct->multiprices_tva_tx[$key]) $pricemodified = true; |
|
470 | + if ($this->product->multiprices_tva_tx[$key] != $oldproduct->multiprices_tva_tx[$key]) { |
|
471 | + $pricemodified = true; |
|
472 | + } |
|
471 | 473 | if ($this->product->multiprices_base_type[$key] == 'TTC') { |
472 | - if ($this->product->multiprices_ttc[$key] != $oldproduct->multiprices_ttc[$key]) $pricemodified = true; |
|
473 | - if ($this->product->multiprices_min_ttc[$key] != $oldproduct->multiprices_min_ttc[$key]) $pricemodified = true; |
|
474 | + if ($this->product->multiprices_ttc[$key] != $oldproduct->multiprices_ttc[$key]) { |
|
475 | + $pricemodified = true; |
|
476 | + } |
|
477 | + if ($this->product->multiprices_min_ttc[$key] != $oldproduct->multiprices_min_ttc[$key]) { |
|
478 | + $pricemodified = true; |
|
479 | + } |
|
474 | 480 | } else { |
475 | - if ($this->product->multiprices[$key] != $oldproduct->multiprices[$key]) $pricemodified = true; |
|
476 | - if ($this->product->multiprices_min[$key] != $oldproduct->multiprices[$key]) $pricemodified = true; |
|
481 | + if ($this->product->multiprices[$key] != $oldproduct->multiprices[$key]) { |
|
482 | + $pricemodified = true; |
|
483 | + } |
|
484 | + if ($this->product->multiprices_min[$key] != $oldproduct->multiprices[$key]) { |
|
485 | + $pricemodified = true; |
|
486 | + } |
|
477 | 487 | } |
478 | 488 | } |
479 | 489 | if ($pricemodified && $result > 0) { |
@@ -445,7 +445,9 @@ |
||
445 | 445 | { |
446 | 446 | $paymentsalary = array(); |
447 | 447 | $fields = Salaries::$FIELDSPAYMENT; |
448 | - if (isModEnabled("bank")) array_push($fields, "accountid"); |
|
448 | + if (isModEnabled("bank")) { |
|
449 | + array_push($fields, "accountid"); |
|
450 | + } |
|
449 | 451 | foreach ($fields as $field) { |
450 | 452 | if (!isset($data[$field])) { |
451 | 453 | throw new RestException(400, "$field field missing"); |
@@ -2663,6 +2663,8 @@ |
||
2663 | 2663 | $this->dictionaries['tab' . $field][] = $dictionaryArray[$field]; |
2664 | 2664 | } |
2665 | 2665 | } |
2666 | - if ($langs && !in_array($langs, $this->dictionaries[$langs])) $this->dictionaries['langs'][] = $langs; |
|
2666 | + if ($langs && !in_array($langs, $this->dictionaries[$langs])) { |
|
2667 | + $this->dictionaries['langs'][] = $langs; |
|
2668 | + } |
|
2667 | 2669 | } |
2668 | 2670 | } |
@@ -3558,7 +3558,9 @@ discard block |
||
3558 | 3558 | $deja_regle = $invoice->getSommePaiement(); |
3559 | 3559 | |
3560 | 3560 | $resteapayer = price2num($invoice->total_ttc - $deja_regle - $total_ttc_rg - $creditnoteamount - $depositsamount, 'MT'); |
3561 | - if ($invoice->paye) $resteapayer = 0; |
|
3561 | + if ($invoice->paye) { |
|
3562 | + $resteapayer = 0; |
|
3563 | + } |
|
3562 | 3564 | |
3563 | 3565 | $y = 0; |
3564 | 3566 | |
@@ -3608,7 +3610,9 @@ discard block |
||
3608 | 3610 | |
3609 | 3611 | if ($deja_regle > 0) { |
3610 | 3612 | $title = $outputlangs->transnoentities("PaymentsAlreadyDone"); |
3611 | - if ($invoice->type == 2) $title = $outputlangs->transnoentities("PaymentsBackAlreadyDone"); |
|
3613 | + if ($invoice->type == 2) { |
|
3614 | + $title = $outputlangs->transnoentities("PaymentsBackAlreadyDone"); |
|
3615 | + } |
|
3612 | 3616 | |
3613 | 3617 | $pdf->SetFont('', '', $default_font_size - 3); |
3614 | 3618 | $pdf->SetXY($posx, $posy + $height * $index); |
@@ -3671,7 +3675,9 @@ discard block |
||
3671 | 3675 | if (!empty($this->tplidx)) { |
3672 | 3676 | $pdf->useTemplate($this->tplidx); |
3673 | 3677 | } |
3674 | - if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs); |
|
3678 | + if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) { |
|
3679 | + $this->_pagehead($pdf, $object, 0, $outputlangs); |
|
3680 | + } |
|
3675 | 3681 | $pdf->setPage($pageposafter + 1); |
3676 | 3682 | $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. |
3677 | 3683 |
@@ -89,7 +89,9 @@ |
||
89 | 89 | $return++; |
90 | 90 | } elseif ((int) $line->fk_product > 0) { |
91 | 91 | if ($product->fetch($line->fk_product) > 0) { |
92 | - if ($product->status_buy) $return++; |
|
92 | + if ($product->status_buy) { |
|
93 | + $return++; |
|
94 | + } |
|
93 | 95 | } |
94 | 96 | } |
95 | 97 | } |
@@ -236,7 +236,9 @@ |
||
236 | 236 | 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']) . '">'; |
237 | 237 | print '<input type="hidden" name="token" value="' . newToken() . '">'; |
238 | 238 | print '<input type="hidden" name="action" value="' . $this->action . '">'; |
239 | - if (!empty($object->id)) print '<input type="hidden" name="id" value="' . $object->id . '">'; |
|
239 | + if (!empty($object->id)) { |
|
240 | + print '<input type="hidden" name="id" value="' . $object->id . '">'; |
|
241 | + } |
|
240 | 242 | print '<input type="hidden" name="trackid" value="' . $this->trackid . '">'; |
241 | 243 | foreach ($this->param as $key => $value) { |
242 | 244 | print '<input type="hidden" name="' . $key . '" value="' . $value . '">'; |