Completed
Branch develop (5d6cf7)
by
unknown
20:24
created
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.
htdocs/knowledgemanagement/knowledgerecord_card.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'knowledgerecordcard'; // To manage different context of search
45 45
 $backtopage = GETPOST('backtopage', 'alpha');
46 46
 $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
47
-$lineid   = GETPOST('lineid', 'int');
47
+$lineid = GETPOST('lineid', 'int');
48 48
 
49 49
 // Initialize technical objects
50 50
 $object = new KnowledgeRecord($db);
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 	print '<table class="border centpercent tableforfield">'."\n";
426 426
 
427 427
 	// Common attributes
428
-	$keyforbreak='fk_c_ticket_category';	// We change column just before this field
428
+	$keyforbreak = 'fk_c_ticket_category'; // We change column just before this field
429 429
 	//unset($object->fields['fk_project']);				// Hide field already shown in banner
430 430
 	//unset($object->fields['fk_soc']);					// Hide field already shown in banner
431 431
 	$object->fields['answer']['enabled'] = 0;
Please login to merge, or discard this patch.
htdocs/takepos/receipt.php 2 patches
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -331,7 +331,10 @@
 block discarded – undo
331 331
 
332 332
 <script type="text/javascript">
333 333
 	<?php
334
-	if ($facid) print 'window.print();'; //Avoid print when is specimen
334
+	if ($facid) {
335
+		print 'window.print();';
336
+	}
337
+	//Avoid print when is specimen
335 338
 	?>
336 339
 </script>
337 340
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 $reshook = $hookmanager->executeHooks('TakeposReceipt', $parameters, $object);
87 87
 if (!empty($hookmanager->resPrint)) {
88 88
 	print $hookmanager->resPrint;
89
-	return;	// Receipt page can be called by the takepos/send.php page that use ob_start/end so we must use return and not exit to stop page
89
+	return; // Receipt page can be called by the takepos/send.php page that use ob_start/end so we must use return and not exit to stop page
90 90
 }
91 91
 
92 92
 // IMPORTANT: This file is sended to 'Takepos Printing' application. Keep basic file. No external files as css, js... If you need images use absolute path.
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 <?php
130 130
 print $langs->trans('Date')." ".dol_print_date($object->date, 'day').'<br>';
131 131
 if (!empty($conf->global->TAKEPOS_RECEIPT_NAME)) {
132
-	print getDolGlobalString('TAKEPOS_RECEIPT_NAME') . " ";
132
+	print getDolGlobalString('TAKEPOS_RECEIPT_NAME')." ";
133 133
 }
134 134
 if ($object->statut == Facture::STATUS_DRAFT) {
135 135
 	print str_replace(")", "", str_replace("-", " ".$langs->trans('Place')." ", str_replace("(PROV-POS", $langs->trans("Terminal")." ", $object->ref)));
@@ -177,13 +177,13 @@  discard block
 block discarded – undo
177 177
 	if ($action == 'without_details') {
178 178
 		$qty = GETPOST('qty', 'int') > 0 ? GETPOST('qty', 'int') : 1;
179 179
 		print '<tr>';
180
-		print '<td>' . GETPOST('label', 'alphanohtml') . '</td>';
181
-		print '<td class="right">' . $qty . '</td>';
182
-		print '<td class="right">' . price(price2num($object->total_ttc / $qty, 'MU'), 1) . '</td>';
180
+		print '<td>'.GETPOST('label', 'alphanohtml').'</td>';
181
+		print '<td class="right">'.$qty.'</td>';
182
+		print '<td class="right">'.price(price2num($object->total_ttc / $qty, 'MU'), 1).'</td>';
183 183
 		if (!empty($conf->global->TAKEPOS_SHOW_HT_RECEIPT)) {
184
-			print '<td class="right">' . price($object->total_ht, 1) . '</td>';
184
+			print '<td class="right">'.price($object->total_ht, 1).'</td>';
185 185
 		}
186
-		print '<td class="right">' . price($object->total_ttc, 1) . '</td>';
186
+		print '<td class="right">'.price($object->total_ttc, 1).'</td>';
187 187
 		print '</tr>';
188 188
 	} else {
189 189
 		foreach ($object->lines as $line) {
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
 				if ((!isModEnabled('multicurrency') || $object->multicurrency_tx == 1) && $row->code == "LIQ" && $row->pos_change > 0) {
342 342
 					echo '<tr>';
343 343
 					echo '<td class="right">';
344
-					echo $langs->trans("Change");	// ChangeBack ?
344
+					echo $langs->trans("Change"); // ChangeBack ?
345 345
 					echo '</td>';
346 346
 					echo '<td class="right">';
347 347
 					echo price($row->pos_change, 1, '', 1, - 1, - 1, $currency);
Please login to merge, or discard this patch.
htdocs/partnership/partnership_document.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -83,10 +83,18 @@
 block discarded – undo
83 83
 //if ($user->socid > 0) accessforbidden();
84 84
 //if ($user->socid > 0) $socid = $user->socid;
85 85
 //$result = restrictedArea($user, 'partnership', $object->id);
86
-if (empty($conf->partnership->enabled)) accessforbidden();
87
-if (empty($permissiontoread)) accessforbidden();
88
-if ($object->id > 0 && !($object->fk_member > 0) && $managedfor == 'member') accessforbidden();
89
-if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor == 'thirdparty') accessforbidden();
86
+if (empty($conf->partnership->enabled)) {
87
+	accessforbidden();
88
+}
89
+if (empty($permissiontoread)) {
90
+	accessforbidden();
91
+}
92
+if ($object->id > 0 && !($object->fk_member > 0) && $managedfor == 'member') {
93
+	accessforbidden();
94
+}
95
+if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor == 'thirdparty') {
96
+	accessforbidden();
97
+}
90 98
 
91 99
 
92 100
 
Please login to merge, or discard this patch.