Completed
Branch develop (6fc0a8)
by
unknown
16:53
created
htdocs/modulebuilder/template/class/myobject.class.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -475,7 +475,9 @@
 block discarded – undo
475 475
 							// single value
476 476
 							$sqlwhere[] = $key . " = " . intval($value);
477 477
 						} elseif (is_array($value)) {
478
-							if (empty($value)) continue;
478
+							if (empty($value)) {
479
+								continue;
480
+							}
479 481
 							$sqlwhere[] = $key . ' IN (' . $this->db->sanitize(implode(',', array_map('intval', $value))) . ')';
480 482
 						}
481 483
 						continue;
Please login to merge, or discard this patch.
htdocs/salaries/virement_request.php 1 patch
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -300,8 +300,9 @@  discard block
 block discarded – undo
300 300
 print '<table class="nobordernopadding" width="100%"><tr><td>';
301 301
 print $langs->trans('DefaultPaymentMode');
302 302
 print '</td>';
303
-if ($action != 'editmode')
303
+if ($action != 'editmode') {
304 304
 	print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmode&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetMode'), 1).'</a></td>';
305
+}
305 306
 print '</tr></table>';
306 307
 print '</td><td>';
307 308
 
@@ -406,8 +407,9 @@  discard block
 block discarded – undo
406 407
 				}
407 408
 
408 409
 				print '<td class="right">';
409
-				if ($bankaccountstatic->id)
410
-					print $bankaccountstatic->getNomUrl(1, 'transactions');
410
+				if ($bankaccountstatic->id) {
411
+									print $bankaccountstatic->getNomUrl(1, 'transactions');
412
+				}
411 413
 				print '</td>';
412 414
 			}
413 415
 			print '<td class="right nowrap amountcard">'.price($objp->amount)."</td>\n";
Please login to merge, or discard this patch.
htdocs/fourn/facture/card.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3936,9 +3936,12 @@
 block discarded – undo
3936 3936
 
3937 3937
 					$parameters = array();
3938 3938
 					$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
3939
-					if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
3940
-					if (empty($reshook))
3941
-						$object->formAddObjectLine(1, $societe, $mysoc);
3939
+					if ($reshook < 0) {
3940
+						setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
3941
+					}
3942
+					if (empty($reshook)) {
3943
+											$object->formAddObjectLine(1, $societe, $mysoc);
3944
+					}
3942 3945
 				}
3943 3946
 			}
3944 3947
 
Please login to merge, or discard this patch.
htdocs/contrat/class/contrat.class.php 1 patch
Braces   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2750,7 +2750,9 @@  discard block
 block discarded – undo
2750 2750
 		$sql.= ' WHERE cd.fk_contrat = c.rowid';
2751 2751
 		$sql.= " AND date_format(cd.date_fin_validite, '%Y-%m-%d') <= date_format('".$this->db->idate($enddatetoscan)."', '%Y-%m-%d')";
2752 2752
 		$sql.= " AND cd.statut = 4";
2753
-		if ($thirdparty_id > 0) $sql.=" AND c.fk_soc = ".((int) $thirdparty_id);
2753
+		if ($thirdparty_id > 0) {
2754
+			$sql.=" AND c.fk_soc = ".((int) $thirdparty_id);
2755
+		}
2754 2756
 		//print $sql;
2755 2757
 
2756 2758
 		$resql = $this->db->query($sql);
@@ -2798,7 +2800,10 @@  discard block
 block discarded – undo
2798 2800
 
2799 2801
 						$someinvoicenotpaid=0;
2800 2802
 						foreach ($object->linkedObjects['facture'] as $idinvoice => $invoice) {
2801
-							if ($invoice->statut == Facture::STATUS_DRAFT) continue;	// Draft invoice are not invoice not paid
2803
+							if ($invoice->statut == Facture::STATUS_DRAFT) {
2804
+								continue;
2805
+							}
2806
+							// Draft invoice are not invoice not paid
2802 2807
 
2803 2808
 							if (empty($invoice->paye)) {
2804 2809
 								$someinvoicenotpaid++;
Please login to merge, or discard this patch.
htdocs/multicurrency/multicurrency_rate.php 1 patch
Braces   +42 added lines, -14 removed lines patch added patch discarded remove patch
@@ -71,8 +71,12 @@  discard block
 block discarded – undo
71 71
 $offset = $limit * $page;
72 72
 $pageprev = $page - 1;
73 73
 $pagenext = $page + 1;
74
-if (!$sortfield) $sortfield = "cr.date_sync";
75
-if (!$sortorder) $sortorder = "DESC";
74
+if (!$sortfield) {
75
+	$sortfield = "cr.date_sync";
76
+}
77
+if (!$sortorder) {
78
+	$sortorder = "DESC";
79
+}
76 80
 
77 81
 
78 82
 // Initialize technical objects
@@ -223,7 +227,9 @@  discard block
 block discarded – undo
223 227
 
224 228
 $parameters = array();
225 229
 $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
226
-if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
230
+if ($reshook < 0) {
231
+	setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
232
+}
227 233
 if (empty($reshook)) {
228 234
 	// Selection of new fields
229 235
 	include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
@@ -326,14 +332,20 @@  discard block
 block discarded – undo
326 332
 $sql .= $hookmanager->resPrint;
327 333
 $sql .= ' FROM '.MAIN_DB_PREFIX.'multicurrency_rate as cr ';
328 334
 $sql .= " INNER JOIN ".MAIN_DB_PREFIX."multicurrency AS m ON cr.fk_multicurrency = m.rowid";
329
-if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall);
335
+if ($sall) {
336
+	$sql .= natural_search(array_keys($fieldstosearchall), $sall);
337
+}
330 338
 if ($search_date_sync && $search_date_sync_end ) {
331 339
 	$sql .= " AND (cr.date_sync BETWEEN '".$db->idate($search_date_sync)."' AND '".$db->idate($search_date_sync_end)."')";
332 340
 } elseif ($search_date_sync && !$search_date_sync_end) {
333 341
 	$sql .= natural_search('cr.date_sync', $db->idate($search_date_sync));
334 342
 }
335
-if ($search_rate) $sql .= natural_search('cr.rate', $search_rate);
336
-if ($search_code) $sql .= natural_search('m.code', $search_code);
343
+if ($search_rate) {
344
+	$sql .= natural_search('cr.rate', $search_rate);
345
+}
346
+if ($search_code) {
347
+	$sql .= natural_search('m.code', $search_code);
348
+}
337 349
 $sql .= " WHERE m.code <> '".$db->escape($conf->currency)."'";
338 350
 
339 351
 // Add where from hooks
@@ -383,10 +395,18 @@  discard block
 block discarded – undo
383 395
 		$param .= "&sall=".urlencode($sall);
384 396
 	}
385 397
 
386
-	if ($search_date_sync) $param = "&search_date_sync=".$search_date_sync;
387
-	if ($search_date_sync_end) $param="&search_date_sync_end=".$search_date_sync_end;
388
-	if ($search_rate) $param = "&search_rate=".urlencode($search_rate);
389
-	if ($search_code != '') $param.="&search_code=".urlencode($search_code);
398
+	if ($search_date_sync) {
399
+		$param = "&search_date_sync=".$search_date_sync;
400
+	}
401
+	if ($search_date_sync_end) {
402
+		$param="&search_date_sync_end=".$search_date_sync_end;
403
+	}
404
+	if ($search_rate) {
405
+		$param = "&search_rate=".urlencode($search_rate);
406
+	}
407
+	if ($search_code != '') {
408
+		$param.="&search_code=".urlencode($search_code);
409
+	}
390 410
 
391 411
 	// Add $param from extra fields
392 412
 	include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
@@ -529,7 +549,9 @@  discard block
 block discarded – undo
529 549
 				print '<td class="tdoverflowmax200">';
530 550
 				print $obj->date_sync;
531 551
 				print "</td>\n";
532
-				if (!$i) $totalarray['nbfield']++;
552
+				if (!$i) {
553
+					$totalarray['nbfield']++;
554
+				}
533 555
 			}
534 556
 
535 557
 			// code
@@ -539,7 +561,9 @@  discard block
 block discarded – undo
539 561
 				print ' - <span class="opacitymedium">'.$obj->name.'</span>';
540 562
 				print "</td>\n";
541 563
 
542
-				if (! $i) $totalarray['nbfield']++;
564
+				if (! $i) {
565
+					$totalarray['nbfield']++;
566
+				}
543 567
 			}
544 568
 
545 569
 			// rate
@@ -547,7 +571,9 @@  discard block
 block discarded – undo
547 571
 				print '<td class="tdoverflowmax200">';
548 572
 				print $obj->rate;
549 573
 				print "</td>\n";
550
-				if (! $i) $totalarray['nbfield']++;
574
+				if (! $i) {
575
+					$totalarray['nbfield']++;
576
+				}
551 577
 			}
552 578
 
553 579
 			// rate indirect
@@ -555,7 +581,9 @@  discard block
 block discarded – undo
555 581
 				print '<td class="tdoverflowmax200">';
556 582
 				print $obj->rate_indirect;
557 583
 				print "</td>\n";
558
-				if (! $i) $totalarray['nbfield']++;
584
+				if (! $i) {
585
+					$totalarray['nbfield']++;
586
+				}
559 587
 			}
560 588
 
561 589
 
Please login to merge, or discard this patch.
htdocs/supplier_proposal/card.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1938,9 +1938,12 @@
 block discarded – undo
1938 1938
 
1939 1939
 				$parameters = array();
1940 1940
 				$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
1941
-				if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1942
-				if (empty($reshook))
1943
-					$object->formAddObjectLine($dateSelector, $soc, $mysoc);
1941
+				if ($reshook < 0) {
1942
+					setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1943
+				}
1944
+				if (empty($reshook)) {
1945
+									$object->formAddObjectLine($dateSelector, $soc, $mysoc);
1946
+				}
1944 1947
 			}
1945 1948
 		}
1946 1949
 
Please login to merge, or discard this patch.
htdocs/core/lib/prelevement.lib.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -107,13 +107,13 @@
 block discarded – undo
107 107
 }
108 108
 
109 109
 	/**
110
- *  Return array head with list of tabs to view object informations
111
- *
112
- *  @param	object	$object         Member
113
- *  @param  int     $nbOfInvoices   No of invoices
114
- *  @param  int     $nbOfSalaryInvoice  No of salary invoices
115
- *  @return array           		head
116
- */
110
+	 *  Return array head with list of tabs to view object informations
111
+	 *
112
+	 *  @param	object	$object         Member
113
+	 *  @param  int     $nbOfInvoices   No of invoices
114
+	 *  @param  int     $nbOfSalaryInvoice  No of salary invoices
115
+	 *  @return array           		head
116
+	 */
117 117
 function bon_prelevement_prepare_head(BonPrelevement $object, $nbOfInvoices, $nbOfSalaryInvoice)
118 118
 {
119 119
 	global $langs, $conf;
Please login to merge, or discard this patch.
htdocs/bom/bom_card.php 1 patch
Braces   +18 added lines, -8 removed lines patch added patch discarded remove patch
@@ -176,8 +176,12 @@  discard block
 block discarded – undo
176 176
 		if (!empty($idprod) && isModEnabled('workstation')) {
177 177
 			$product = new Product($db);
178 178
 			$res = $product->fetch($idprod);
179
-			if ($res > 0 && $product->type == Product::TYPE_SERVICE) $fk_default_workstation = $product->fk_default_workstation;
180
-			if (empty($fk_unit)) $fk_unit = $product->fk_unit;
179
+			if ($res > 0 && $product->type == Product::TYPE_SERVICE) {
180
+				$fk_default_workstation = $product->fk_default_workstation;
181
+			}
182
+			if (empty($fk_unit)) {
183
+				$fk_unit = $product->fk_unit;
184
+			}
181 185
 		}
182 186
 
183 187
 		if ($qty == '') {
@@ -615,9 +619,12 @@  discard block
 block discarded – undo
615 619
 
616 620
 				$parameters = array();
617 621
 				$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
618
-				if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
619
-				if (empty($reshook))
620
-					$object->formAddObjectLine(1, $mysoc, null, '/bom/tpl');
622
+				if ($reshook < 0) {
623
+					setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
624
+				}
625
+				if (empty($reshook)) {
626
+									$object->formAddObjectLine(1, $mysoc, null, '/bom/tpl');
627
+				}
621 628
 			}
622 629
 		}
623 630
 
@@ -662,9 +669,12 @@  discard block
 block discarded – undo
662 669
 				// Add services form
663 670
 				$parameters = array();
664 671
 				$reshook = $hookmanager->executeHooks('formAddObjectServiceLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
665
-				if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
666
-				if (empty($reshook))
667
-					$object->formAddObjectLine(1, $mysoc, null, '/bom/tpl');
672
+				if ($reshook < 0) {
673
+					setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
674
+				}
675
+				if (empty($reshook)) {
676
+									$object->formAddObjectLine(1, $mysoc, null, '/bom/tpl');
677
+				}
668 678
 			}
669 679
 		}
670 680
 	}
Please login to merge, or discard this patch.
htdocs/bom/class/bom.class.php 1 patch
Braces   +12 added lines, -5 removed lines patch added patch discarded remove patch
@@ -781,7 +781,9 @@  discard block
 block discarded – undo
781 781
 			$line->import_key = $import_key;
782 782
 			$line->position = $rankToUse;
783 783
 
784
-			if (!empty($fk_unit)) $line->fk_unit = $fk_unit;
784
+			if (!empty($fk_unit)) {
785
+				$line->fk_unit = $fk_unit;
786
+			}
785 787
 
786 788
 
787 789
 			if (is_array($array_options) && count($array_options) > 0) {
@@ -1475,8 +1477,9 @@  discard block
 block discarded – undo
1475 1477
 						$workstation = new Workstation($this->db);
1476 1478
 						$res = $workstation->fetch($tmpproduct->fk_default_workstation);
1477 1479
 
1478
-						if ($res > 0) $line->total_cost = price2num($qtyhourforline * ($workstation->thm_operator_estimated + $workstation->thm_machine_estimated), 'MT');
1479
-						else {
1480
+						if ($res > 0) {
1481
+							$line->total_cost = price2num($qtyhourforline * ($workstation->thm_operator_estimated + $workstation->thm_machine_estimated), 'MT');
1482
+						} else {
1480 1483
 							$this->error = $workstation->error;
1481 1484
 								return -3;
1482 1485
 						}
@@ -1540,7 +1543,9 @@  discard block
 block discarded – undo
1540 1543
 		if (!empty($this->lines)) {
1541 1544
 			foreach ($this->lines as $line) {
1542 1545
 				if (!empty($line->childBom)) {
1543
-					foreach ($line->childBom as $childBom) $childBom->getNetNeeds($TNetNeeds, $line->qty*$qty);
1546
+					foreach ($line->childBom as $childBom) {
1547
+						$childBom->getNetNeeds($TNetNeeds, $line->qty*$qty);
1548
+					}
1544 1549
 				} else {
1545 1550
 					if (empty($TNetNeeds[$line->fk_product])) {
1546 1551
 						$TNetNeeds[$line->fk_product] = 0;
@@ -1595,7 +1600,9 @@  discard block
 block discarded – undo
1595 1600
 			return;
1596 1601
 		}
1597 1602
 
1598
-		if (empty($bom_id)) $bom_id=$this->id;
1603
+		if (empty($bom_id)) {
1604
+			$bom_id=$this->id;
1605
+		}
1599 1606
 
1600 1607
 		$sql = 'SELECT l.fk_bom, b.label
1601 1608
 				FROM '.MAIN_DB_PREFIX.'bom_bomline l
Please login to merge, or discard this patch.