Completed
Branch develop (ac6154)
by
unknown
17:16
created
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/lib/fourn.lib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -175,10 +175,10 @@
 block discarded – undo
175 175
 			$dispachedLines = $object->getDispachedLines(1);
176 176
 			$nbDispachedLines = count($dispachedLines);
177 177
 
178
-			for ($line = 0 ; $line < $nbDispachedLines; $line++) {
178
+			for ($line = 0; $line < $nbDispachedLines; $line++) {
179 179
 				$sumQtyAllreadyDispatched = $sumQtyAllreadyDispatched + $dispachedLines[$line]['qty'];
180 180
 			}
181
-			for ($line = 0 ; $line < $nbLinesOrdered; $line++) {
181
+			for ($line = 0; $line < $nbLinesOrdered; $line++) {
182 182
 				//If line is a product of conf to manage stocks for services
183 183
 				if ($object->lines[$line]->product_type == 0 || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
184 184
 					$sumQtyOrdered = $sumQtyOrdered + $object->lines[$line]->qty;
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
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 				$pdf->SetFont(pdf_getPDFFont($outputlangs));
250 250
 				// Set path to the background PDF File
251 251
 				if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) {
252
-					$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
252
+					$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
253 253
 					$tplidx = $pdf->importPage(1);
254 254
 				}
255 255
 
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 				$pdf->SetTextColor(0, 0, 0);
285 285
 
286 286
 				$tab_top = 90;
287
-				$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift: 10);
287
+				$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
288 288
 
289 289
 				$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
290 290
 
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 						$height_trackingnumber = 4;
330 330
 
331 331
 						$pdf->SetFont('', 'B', $default_font_size - 2);
332
-						$pdf->writeHTMLCell(60, $height_trackingnumber, $this->posxdesc - 1, $tab_top - 1, $outputlangs->transnoentities("TrackingNumber") . " : " . $object->tracking_number, 0, 1, false, true, 'L');
332
+						$pdf->writeHTMLCell(60, $height_trackingnumber, $this->posxdesc - 1, $tab_top - 1, $outputlangs->transnoentities("TrackingNumber")." : ".$object->tracking_number, 0, 1, false, true, 'L');
333 333
 
334 334
 						$tab_top_alt = $pdf->GetY();
335 335
 						$object->getUrlTrackingStatus($object->tracking_number);
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
 									if (empty($height_trackingnumber)) {
435 435
 										$height_note = $this->page_hauteur - ($tab_top + $heightforfooter);
436 436
 									} else {
437
-										$height_note = $this->page_hauteur - ($tab_top + $heightforfooter)+ $height_trackingnumber + 1;
437
+										$height_note = $this->page_hauteur - ($tab_top + $heightforfooter) + $height_trackingnumber + 1;
438 438
 										$tab_top = $tab_topbeforetrackingnumber;
439 439
 									}
440 440
 									$pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 2);
@@ -820,7 +820,7 @@  discard block
 block discarded – undo
820 820
 			if ($object->volume_units < 50) {
821 821
 				$totalVolumetoshow = showDimensionInBestUnit($object->trueVolume, $object->volume_units, "volume", $outputlangs);
822 822
 			} else {
823
-				$totalVolumetoshow =  price($object->trueVolume, 0, $outputlangs, 0, 0).' '.measuringUnitString(0, "volume", $object->volume_units);
823
+				$totalVolumetoshow = price($object->trueVolume, 0, $outputlangs, 0, 0).' '.measuringUnitString(0, "volume", $object->volume_units);
824 824
 			}
825 825
 		}
826 826
 
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.
htdocs/core/modules/mailings/thirdparties_services_expired.modules.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -135,8 +135,8 @@
 block discarded – undo
135 135
 					'lastname' => $obj->name, // For thirdparties, lastname must be name
136 136
 					'firstname' => '', // For thirdparties, firstname is ''
137 137
 					'other' =>
138
-					('DateStart='.dol_print_date($this->db->jdate($obj->date_start_real), 'day')).';'.	// date start real
139
-					('DateEnd='.dol_print_date($this->db->jdate($obj->date_end), 'day')).';'.			// date end planned
138
+					('DateStart='.dol_print_date($this->db->jdate($obj->date_start_real), 'day')).';'.// date start real
139
+					('DateEnd='.dol_print_date($this->db->jdate($obj->date_end), 'day')).';'.// date end planned
140 140
 					('Contract='.$obj->fk_contrat).';'.
141 141
 					('ContactLine='.$obj->cdid),
142 142
 					'source_url' => $this->url($obj->id),
Please login to merge, or discard this patch.
htdocs/projet/tasks/task.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 
226 226
 $title = $object->ref;
227 227
 if (!empty($withproject)) {
228
-	$title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '')  ;
228
+	$title .= ' | '.$langs->trans("Project").(!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '');
229 229
 }
230 230
 $help_url = '';
231 231
 
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 		// Title
267 267
 		$morehtmlref .= $projectstatic->title;
268 268
 		// Thirdparty
269
-		if (!empty($projectstatic->thirdparty->id) &&$projectstatic->thirdparty->id > 0) {
269
+		if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
270 270
 			$morehtmlref .= '<br>'.$projectstatic->thirdparty->getNomUrl(1, 'project');
271 271
 		}
272 272
 		$morehtmlref .= '</div>';
Please login to merge, or discard this patch.