Completed
Branch develop (1d589f)
by
unknown
21:18
created
htdocs/core/db/pgsql.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -756,10 +756,10 @@
 block discarded – undo
756 756
 	public function regexpsql($subject, $pattern, $sqlstring = false)
757 757
 	{
758 758
 		if ($sqlstring) {
759
-			return "(". $subject ." ~ '" . $pattern . "')";
759
+			return "(".$subject." ~ '".$pattern."')";
760 760
 		}
761 761
 
762
-		return "('". $subject ."' ~ '" . $pattern . "')";
762
+		return "('".$subject."' ~ '".$pattern."')";
763 763
 	}
764 764
 
765 765
 
Please login to merge, or discard this patch.
htdocs/core/ajax/row.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	if ($reshook > 0) {
133 133
 		$perm = $hookmanager->resArray['perm'];
134 134
 	}
135
-	if (! $perm) {
135
+	if (!$perm) {
136 136
 		// We should not be here. If we are not allowed to reorder rows, feature should not be visible on script.
137 137
 		// If we are here, it is a hack attempt, so we report a warning.
138 138
 		print 'Bad permission to modify position of lines for object in table '.$table_element_line;
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 
155 155
 	// Reorder line to have position of children lines sharing same counter than parent lines
156 156
 	// This should be useless because there is no need to have children sharing same counter than parent, but well, it's cleaner into database.
157
-	if (in_array($fk_element, array('fk_facture', 'fk_propal', 'fk_commande','fk_contrat'))) {
157
+	if (in_array($fk_element, array('fk_facture', 'fk_propal', 'fk_commande', 'fk_contrat'))) {
158 158
 		$result = $row->line_order(true);
159 159
 	}
160 160
 } else {
Please login to merge, or discard this patch.
htdocs/core/lib/company.lib.php 2 patches
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1538,7 +1538,9 @@  discard block
 block discarded – undo
1538 1538
 		// Fields from hook
1539 1539
 		$parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon);
1540 1540
 		$reshook = $hookmanager->executeHooks('showActionsDoneListSelect', $parameters);    // Note that $action and $object may have been modified by hook
1541
-		if (!empty($hookmanager->resPrint)) $sql.= $hookmanager->resPrint;
1541
+		if (!empty($hookmanager->resPrint)) {
1542
+			$sql.= $hookmanager->resPrint;
1543
+		}
1542 1544
 
1543 1545
 		$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a";
1544 1546
 		$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_action";
@@ -1554,7 +1556,9 @@  discard block
 block discarded – undo
1554 1556
 		// Fields from hook
1555 1557
 		$parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon);
1556 1558
 		$reshook = $hookmanager->executeHooks('showActionsDoneListFrom', $parameters);    // Note that $action and $object may have been modified by hook
1557
-		if (!empty($hookmanager->resPrint)) $sql.= $hookmanager->resPrint;
1559
+		if (!empty($hookmanager->resPrint)) {
1560
+			$sql.= $hookmanager->resPrint;
1561
+		}
1558 1562
 
1559 1563
 		if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur'))) {
1560 1564
 			$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid";
@@ -1659,7 +1663,9 @@  discard block
 block discarded – undo
1659 1663
 		// Fields from hook
1660 1664
 		$parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon, 'module' => $module);
1661 1665
 		$reshook = $hookmanager->executeHooks('showActionsDoneListWhere', $parameters);    // Note that $action and $object may have been modified by hook
1662
-		if (!empty($hookmanager->resPrint)) $sql.= $hookmanager->resPrint;
1666
+		if (!empty($hookmanager->resPrint)) {
1667
+			$sql.= $hookmanager->resPrint;
1668
+		}
1663 1669
 
1664 1670
 		if (is_array($actioncode)) {
1665 1671
 			foreach ($actioncode as $code) {
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 					$nbContact = $obj->nb;
82 82
 				}
83 83
 
84
-				dol_setcache($cachekey, $nbContact, 120);	// If setting cache fails, this is not a problem, so we do not test result.
84
+				dol_setcache($cachekey, $nbContact, 120); // If setting cache fails, this is not a problem, so we do not test result.
85 85
 			}
86 86
 
87 87
 			$head[$h][0] = DOL_URL_ROOT.'/societe/contact.php?socid='.$object->id;
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 			} else {
160 160
 				dol_print_error($db);
161 161
 			}
162
-			dol_setcache($cachekey, $nbProject, 120);	// If setting cache fails, this is not a problem, so we do not test result.
162
+			dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result.
163 163
 		}
164 164
 		$head[$h][0] = DOL_URL_ROOT.'/societe/project.php?socid='.$object->id;
165 165
 		$head[$h][1] = $langs->trans("Projects");
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 				} else {
335 335
 					dol_print_error($db);
336 336
 				}
337
-				dol_setcache($cachekey, $nbNotif, 120);		// If setting cache fails, this is not a problem, so we do not test result.
337
+				dol_setcache($cachekey, $nbNotif, 120); // If setting cache fails, this is not a problem, so we do not test result.
338 338
 			}
339 339
 
340 340
 			$head[$h][0] = DOL_URL_ROOT.'/societe/notify/card.php?socid='.urlencode($object->id);
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 			$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
378 378
 			$nbLinks = Link::count($db, $object->element, $object->id);
379 379
 			$totalAttached = $nbFiles + $nbLinks;
380
-			dol_setcache($cachekey, $totalAttached, 120);		// If setting cache fails, this is not a problem, so we do not test result.
380
+			dol_setcache($cachekey, $totalAttached, 120); // If setting cache fails, this is not a problem, so we do not test result.
381 381
 		}
382 382
 
383 383
 		$head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id;
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
 
392 392
 	$head[$h][0] = DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id;
393 393
 	$head[$h][1] = $langs->trans("Events");
394
-	if (isModEnabled('agenda')&& ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) {
394
+	if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) {
395 395
 		$nbEvent = 0;
396 396
 		// Enable caching of thirdparty count actioncomm
397 397
 		require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php';
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
 			} else {
412 412
 				dol_syslog('Failed to count actioncomm '.$db->lasterror(), LOG_ERR);
413 413
 			}
414
-			dol_setcache($cachekey, $nbEvent, 120);		// If setting cache fails, this is not a problem, so we do not test result.
414
+			dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result.
415 415
 		}
416 416
 
417 417
 		$head[$h][1] .= '/';
@@ -805,7 +805,7 @@  discard block
 block discarded – undo
805 805
 		return false;
806 806
 	}
807 807
 
808
-	$country_code_in_EEC = getCountriesInEEC();		// This make a database call but there is a cache done into $conf->cache['country_code_in_EEC']
808
+	$country_code_in_EEC = getCountriesInEEC(); // This make a database call but there is a cache done into $conf->cache['country_code_in_EEC']
809 809
 
810 810
 	//print "dd".$object->country_code;
811 811
 	return in_array($object->country_code, $country_code_in_EEC);
@@ -1202,7 +1202,7 @@  discard block
 block discarded – undo
1202 1202
 	$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as t";
1203 1203
 	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople_extrafields as ef on (t.rowid = ef.fk_object)";
1204 1204
 	$sql .= " WHERE t.fk_soc = ".((int) $object->id);
1205
-	$sql .= " AND t.entity IN (" .getEntity('socpeople') .")";
1205
+	$sql .= " AND t.entity IN (".getEntity('socpeople').")";
1206 1206
 	$sql .= " AND ((t.fk_user_creat = ".((int) $user->id)." AND t.priv = 1) OR t.priv = 0)";
1207 1207
 	if ($search_rowid) {
1208 1208
 		$sql .= natural_search('t.rowid', $search_rowid);
@@ -1407,7 +1407,7 @@  discard block
 block discarded – undo
1407 1407
 				print '<td class="nowrap center">';
1408 1408
 
1409 1409
 				// Add to agenda
1410
-				if (isModEnabled('agenda')&& $user->hasRight('agenda', 'myactions', 'create')) {
1410
+				if (isModEnabled('agenda') && $user->hasRight('agenda', 'myactions', 'create')) {
1411 1411
 					print '<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&actioncode=&contactid='.$obj->rowid.'&socid='.$object->id.'&backtopage='.urlencode($backtopage).'">';
1412 1412
 					print img_object($langs->trans("Event"), "action");
1413 1413
 					print '</a> &nbsp; ';
@@ -1485,7 +1485,7 @@  discard block
 block discarded – undo
1485 1485
 
1486 1486
 			if ($showuserlogin) {
1487 1487
 				print '<td class="tdoverflowmax125">';
1488
-				$tmpuser= new User($db);
1488
+				$tmpuser = new User($db);
1489 1489
 				$resfetch = $tmpuser->fetch(0, '', '', 0, -1, '', $contactstatic->id);
1490 1490
 				if ($resfetch > 0) {
1491 1491
 					print $tmpuser->getNomUrl(1, '', 0, 0, 24, 1);
@@ -1502,7 +1502,7 @@  discard block
 block discarded – undo
1502 1502
 				print '<td class="nowrap center">';
1503 1503
 
1504 1504
 				// Add to agenda
1505
-				if (isModEnabled('agenda')&& $user->hasRight('agenda', 'myactions', 'create')) {
1505
+				if (isModEnabled('agenda') && $user->hasRight('agenda', 'myactions', 'create')) {
1506 1506
 					print '<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&actioncode=&contactid='.$obj->rowid.'&socid='.$object->id.'&backtopage='.urlencode($backtopage).'">';
1507 1507
 					print img_object($langs->trans("Event"), "action");
1508 1508
 					print '</a> &nbsp; ';
@@ -1685,8 +1685,8 @@  discard block
 block discarded – undo
1685 1685
 
1686 1686
 		// Fields from hook
1687 1687
 		$parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon);
1688
-		$reshook = $hookmanager->executeHooks('showActionsDoneListSelect', $parameters);    // Note that $action and $object may have been modified by hook
1689
-		if (!empty($hookmanager->resPrint)) $sql.= $hookmanager->resPrint;
1688
+		$reshook = $hookmanager->executeHooks('showActionsDoneListSelect', $parameters); // Note that $action and $object may have been modified by hook
1689
+		if (!empty($hookmanager->resPrint)) $sql .= $hookmanager->resPrint;
1690 1690
 
1691 1691
 		$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a";
1692 1692
 		$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_action";
@@ -1701,8 +1701,8 @@  discard block
 block discarded – undo
1701 1701
 
1702 1702
 		// Fields from hook
1703 1703
 		$parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon);
1704
-		$reshook = $hookmanager->executeHooks('showActionsDoneListFrom', $parameters);    // Note that $action and $object may have been modified by hook
1705
-		if (!empty($hookmanager->resPrint)) $sql.= $hookmanager->resPrint;
1704
+		$reshook = $hookmanager->executeHooks('showActionsDoneListFrom', $parameters); // Note that $action and $object may have been modified by hook
1705
+		if (!empty($hookmanager->resPrint)) $sql .= $hookmanager->resPrint;
1706 1706
 
1707 1707
 		if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur'))) {
1708 1708
 			$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid";
@@ -1824,8 +1824,8 @@  discard block
 block discarded – undo
1824 1824
 
1825 1825
 		// Fields from hook
1826 1826
 		$parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon, 'module' => $module);
1827
-		$reshook = $hookmanager->executeHooks('showActionsDoneListWhere', $parameters);    // Note that $action and $object may have been modified by hook
1828
-		if (!empty($hookmanager->resPrint)) $sql.= $hookmanager->resPrint;
1827
+		$reshook = $hookmanager->executeHooks('showActionsDoneListWhere', $parameters); // Note that $action and $object may have been modified by hook
1828
+		if (!empty($hookmanager->resPrint)) $sql .= $hookmanager->resPrint;
1829 1829
 
1830 1830
 		if (is_array($actioncode)) {
1831 1831
 			foreach ($actioncode as $code) {
@@ -1933,7 +1933,7 @@  discard block
 block discarded – undo
1933 1933
 		}
1934 1934
 	}
1935 1935
 
1936
-	if (isModEnabled('agenda')|| (isModEnabled('mailing') && !empty($objcon->email))) {
1936
+	if (isModEnabled('agenda') || (isModEnabled('mailing') && !empty($objcon->email))) {
1937 1937
 		$delay_warning = $conf->global->MAIN_DELAY_ACTIONS_TODO * 24 * 60 * 60;
1938 1938
 
1939 1939
 		require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
@@ -2499,14 +2499,14 @@  discard block
 block discarded – undo
2499 2499
 		$parammessageform = 'ONLINE_PAYMENT_MESSAGE_FORM_'.$suffix;
2500 2500
 		if (getDolGlobalString($parammessageform) !== '') {
2501 2501
 			print $langs->transnoentities(getDolGlobalString($parammessageform));
2502
-		} elseif (getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORM')  !== '') {
2502
+		} elseif (getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORM') !== '') {
2503 2503
 			print $langs->transnoentities(getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORM'));
2504 2504
 		}
2505 2505
 
2506 2506
 		// Add other message if VAT exists
2507 2507
 		if (!empty($object->total_vat) || !empty($object->total_tva)) {
2508 2508
 			$parammessageform = 'ONLINE_PAYMENT_MESSAGE_FORMIFVAT_'.$suffix;
2509
-			if (getDolGlobalString($parammessageform)  !== '') {
2509
+			if (getDolGlobalString($parammessageform) !== '') {
2510 2510
 				print $langs->transnoentities(getDolGlobalString($parammessageform));
2511 2511
 			} elseif (getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORMIFVAT') !== '') {
2512 2512
 				print $langs->transnoentities(getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORMIFVAT'));
Please login to merge, or discard this patch.
htdocs/core/lib/product.lib.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,11 +38,11 @@  discard block
 block discarded – undo
38 38
 	$langs->load("products");
39 39
 
40 40
 	$label = $langs->trans('Product');
41
-	$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS')?$user->hasRight('product', 'product_advance', 'read_prices'):$user->hasRight('product', 'read');
41
+	$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS') ? $user->hasRight('product', 'product_advance', 'read_prices') : $user->hasRight('product', 'read');
42 42
 
43 43
 	if ($object->isService()) {
44 44
 		$label = $langs->trans('Service');
45
-		$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS')?$user->hasRight('service', 'service_advance', 'read_prices'):$user->hasRight('service', 'read');
45
+		$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS') ? $user->hasRight('service', 'service_advance', 'read_prices') : $user->hasRight('service', 'read');
46 46
 	}
47 47
 
48 48
 	$h = 0;
@@ -276,10 +276,10 @@  discard block
 block discarded – undo
276 276
 		if (!empty($object->note_public)) {
277 277
 			$nbNote++;
278 278
 		}
279
-		$head[$h][0] = DOL_URL_ROOT .'/product/stock/productlot_note.php?id=' . $object->id;
279
+		$head[$h][0] = DOL_URL_ROOT.'/product/stock/productlot_note.php?id='.$object->id;
280 280
 		$head[$h][1] = $langs->trans('Notes');
281 281
 		if ($nbNote > 0) {
282
-			$head[$h][1] .= '<span class="badge marginleftonlyshort">' . $nbNote . '</span>';
282
+			$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
283 283
 		}
284 284
 		$head[$h][2] = 'note';
285 285
 		$h++;
Please login to merge, or discard this patch.
htdocs/core/actions_setmoduleoptions.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -78,19 +78,19 @@  discard block
 block discarded – undo
78 78
 
79 79
 	$listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim(getDolGlobalString($keyforuploaddir))));
80 80
 	foreach ($listofdir as $key => $tmpdir) {
81
-		$tmpdir = preg_replace('/DOL_DATA_ROOT\/*/', '', $tmpdir);	// Clean string if we found a hardcoded DOL_DATA_ROOT
81
+		$tmpdir = preg_replace('/DOL_DATA_ROOT\/*/', '', $tmpdir); // Clean string if we found a hardcoded DOL_DATA_ROOT
82 82
 		if (!$tmpdir) {
83 83
 			unset($listofdir[$key]);
84 84
 			continue;
85 85
 		}
86
-		$tmpdir = DOL_DATA_ROOT.'/'.$tmpdir;	// Complete with DOL_DATA_ROOT. Only files into DOL_DATA_ROOT can be reach/set
86
+		$tmpdir = DOL_DATA_ROOT.'/'.$tmpdir; // Complete with DOL_DATA_ROOT. Only files into DOL_DATA_ROOT can be reach/set
87 87
 		if (!is_dir($tmpdir)) {
88 88
 			if (empty($nomessageinsetmoduleoptions)) {
89 89
 				setEventMessages($langs->trans("ErrorDirNotFound", $tmpdir), null, 'warnings');
90 90
 			}
91 91
 		} else {
92 92
 			$upload_dir = $tmpdir;
93
-			break;	// So we take the first directory found into setup $conf->global->$keyforuploaddir
93
+			break; // So we take the first directory found into setup $conf->global->$keyforuploaddir
94 94
 		}
95 95
 	}
96 96
 
@@ -130,19 +130,19 @@  discard block
 block discarded – undo
130 130
 
131 131
 		foreach ($listofdir as $key => $tmpdir) {
132 132
 			$tmpdir = trim($tmpdir);
133
-			$tmpdir = preg_replace('/DOL_DATA_ROOT\/*/', '', $tmpdir);	// Clean string if we found a hardcoded DOL_DATA_ROOT
133
+			$tmpdir = preg_replace('/DOL_DATA_ROOT\/*/', '', $tmpdir); // Clean string if we found a hardcoded DOL_DATA_ROOT
134 134
 			if (!$tmpdir) {
135 135
 				unset($listofdir[$key]);
136 136
 				continue;
137 137
 			}
138
-			$tmpdir = DOL_DATA_ROOT.'/'.$tmpdir;	// Complete with DOL_DATA_ROOT. Only files into DOL_DATA_ROOT can be reach/set
138
+			$tmpdir = DOL_DATA_ROOT.'/'.$tmpdir; // Complete with DOL_DATA_ROOT. Only files into DOL_DATA_ROOT can be reach/set
139 139
 			if (!is_dir($tmpdir)) {
140 140
 				if (empty($nomessageinsetmoduleoptions)) {
141 141
 					setEventMessages($langs->trans("ErrorDirNotFound", $tmpdir), null, 'warnings');
142 142
 				}
143 143
 			} else {
144 144
 				$upload_dir = $tmpdir;
145
-				break;	// So we take the first directory found into setup $conf->global->$keyforuploaddir
145
+				break; // So we take the first directory found into setup $conf->global->$keyforuploaddir
146 146
 			}
147 147
 		}
148 148
 
Please login to merge, or discard this patch.
htdocs/core/class/cunits.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -429,7 +429,7 @@
 block discarded – undo
429 429
 		if ($mode == 'short_label') {
430 430
 			return dol_getIdFromCode($this->db, $code, 'c_units', 'short_label', 'rowid', 0, " AND unit_type = '".$this->db->escape($unit_type)."'");
431 431
 		} elseif ($mode == 'code') {
432
-			return dol_getIdFromCode($this->db, $code, 'c_units', 'code', 'rowid', 0, " AND unit_type = '". $this->db->escape($unit_type) ."'");
432
+			return dol_getIdFromCode($this->db, $code, 'c_units', 'code', 'rowid', 0, " AND unit_type = '".$this->db->escape($unit_type)."'");
433 433
 		}
434 434
 
435 435
 		return $code;
Please login to merge, or discard this patch.
htdocs/core/modules/expedition/doc/pdf_espadon.modules.php 2 patches
Braces   +18 added lines, -6 removed lines patch added patch discarded remove patch
@@ -427,8 +427,12 @@  discard block
 block discarded – undo
427 427
 							while ($pagenb < $pageposafternote) {
428 428
 								$pdf->AddPage();
429 429
 								$pagenb++;
430
-								if (!empty($tplidx)) $pdf->useTemplate($tplidx);
431
-								if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
430
+								if (!empty($tplidx)) {
431
+									$pdf->useTemplate($tplidx);
432
+								}
433
+								if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
434
+									$this->_pagehead($pdf, $object, 0, $outputlangs);
435
+								}
432 436
 								// $this->_pagefoot($pdf,$object,$outputlangs,1);
433 437
 								$pdf->setTopMargin($tab_top_newpage);
434 438
 								// The only function to edit the bottom margin of current page to set it.
@@ -481,8 +485,12 @@  discard block
 block discarded – undo
481 485
 
482 486
 							// apply note frame to last page
483 487
 							$pdf->setPage($pageposafternote);
484
-							if (!empty($tplidx)) $pdf->useTemplate($tplidx);
485
-							if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
488
+							if (!empty($tplidx)) {
489
+								$pdf->useTemplate($tplidx);
490
+							}
491
+							if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
492
+								$this->_pagehead($pdf, $object, 0, $outputlangs);
493
+							}
486 494
 							$height_note = $posyafter - $tab_top_newpage;
487 495
 							$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
488 496
 						} else // No pagebreak
@@ -499,8 +507,12 @@  discard block
 block discarded – undo
499 507
 								$pagenb++;
500 508
 								$pageposafternote++;
501 509
 								$pdf->setPage($pageposafternote);
502
-								if (!empty($tplidx)) $pdf->useTemplate($tplidx);
503
-								if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
510
+								if (!empty($tplidx)) {
511
+									$pdf->useTemplate($tplidx);
512
+								}
513
+								if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
514
+									$this->_pagehead($pdf, $object, 0, $outputlangs);
515
+								}
504 516
 
505 517
 								$posyafter = $tab_top_newpage;
506 518
 							}
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 				$pdf->SetFont(pdf_getPDFFont($outputlangs));
254 254
 				// Set path to the background PDF File
255 255
 				if (getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) {
256
-					$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
256
+					$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
257 257
 					$tplidx = $pdf->importPage(1);
258 258
 				}
259 259
 
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 				$pdf->SetTextColor(0, 0, 0);
289 289
 
290 290
 				$tab_top = 90;
291
-				$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift: 10);
291
+				$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
292 292
 
293 293
 				$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
294 294
 
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
 						$height_trackingnumber = 4;
334 334
 
335 335
 						$pdf->SetFont('', 'B', $default_font_size - 2);
336
-						$pdf->writeHTMLCell(60, $height_trackingnumber, $this->posxdesc - 1, $tab_top - 1, $outputlangs->transnoentities("TrackingNumber") . " : " . $object->tracking_number, 0, 1, false, true, 'L');
336
+						$pdf->writeHTMLCell(60, $height_trackingnumber, $this->posxdesc - 1, $tab_top - 1, $outputlangs->transnoentities("TrackingNumber")." : ".$object->tracking_number, 0, 1, false, true, 'L');
337 337
 
338 338
 						$tab_top_alt = $pdf->GetY();
339 339
 						$object->getUrlTrackingStatus($object->tracking_number);
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
 									if (empty($height_trackingnumber)) {
439 439
 										$height_note = $this->page_hauteur - ($tab_top + $heightforfooter);
440 440
 									} else {
441
-										$height_note = $this->page_hauteur - ($tab_top + $heightforfooter)+ $height_trackingnumber + 1;
441
+										$height_note = $this->page_hauteur - ($tab_top + $heightforfooter) + $height_trackingnumber + 1;
442 442
 										$tab_top = $tab_topbeforetrackingnumber;
443 443
 									}
444 444
 									$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 2);
@@ -825,7 +825,7 @@  discard block
 block discarded – undo
825 825
 			if ($object->volume_units < 50) {
826 826
 				$totalVolumetoshow = showDimensionInBestUnit($object->trueVolume, $object->volume_units, "volume", $outputlangs);
827 827
 			} else {
828
-				$totalVolumetoshow =  price($object->trueVolume, 0, $outputlangs, 0, 0).' '.measuringUnitString(0, "volume", $object->volume_units);
828
+				$totalVolumetoshow = price($object->trueVolume, 0, $outputlangs, 0, 0).' '.measuringUnitString(0, "volume", $object->volume_units);
829 829
 			}
830 830
 		}
831 831
 
Please login to merge, or discard this patch.
htdocs/core/modules/workstation/mod_workstation_standard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
  *  \ingroup    workstation
24 24
  *  \brief      File of class to manage Workstation numbering rules standard
25 25
  */
26
-require_once DOL_DOCUMENT_ROOT . '/core/modules/workstation/modules_workstation.php';
26
+require_once DOL_DOCUMENT_ROOT.'/core/modules/workstation/modules_workstation.php';
27 27
 
28 28
 /**
29 29
  * Class to manage the Standard numbering rule for Workstation
Please login to merge, or discard this patch.
htdocs/core/modules/product_batch/mod_sn_advanced.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@
 block discarded – undo
154 154
 			}
155 155
 		}
156 156
 
157
-		if (!$mask)	{
157
+		if (!$mask) {
158 158
 			$this->error = 'NotConfigured';
159 159
 			return 0;
160 160
 		}
Please login to merge, or discard this patch.