Completed
Branch develop (d02c61)
by
unknown
18:56
created
htdocs/product/admin/stock_mouvement_extrafields.php 1 patch
Braces   +24 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,16 +29,28 @@  discard block
 block discarded – undo
29 29
 // Load Dolibarr environment
30 30
 $res = 0;
31 31
 // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
32
-if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
32
+if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) {
33
+	$res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
34
+}
33 35
 // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME
34 36
 $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1;
35 37
 while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; }
36
-if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php";
37
-if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php";
38
+if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) {
39
+	$res = @include substr($tmp, 0, ($i + 1))."/main.inc.php";
40
+}
41
+if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) {
42
+	$res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php";
43
+}
38 44
 // Try main.inc.php using relative path
39
-if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php";
40
-if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php";
41
-if (!$res) die("Include of main fails");
45
+if (!$res && file_exists("../../main.inc.php")) {
46
+	$res = @include "../../main.inc.php";
47
+}
48
+if (!$res && file_exists("../../../main.inc.php")) {
49
+	$res = @include "../../../main.inc.php";
50
+}
51
+if (!$res) {
52
+	die("Include of main fails");
53
+}
42 54
 
43 55
 require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
44 56
 require_once DOL_DOCUMENT_ROOT.'/core/lib/stock.lib.php';
@@ -52,13 +64,17 @@  discard block
 block discarded – undo
52 64
 // List of supported format
53 65
 $tmptype2label = ExtraFields::$type2label;
54 66
 $type2label = array('');
55
-foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val);
67
+foreach ($tmptype2label as $key => $val) {
68
+	$type2label[$key] = $langs->transnoentitiesnoconv($val);
69
+}
56 70
 
57 71
 $action = GETPOST('action', 'aZ09');
58 72
 $attrname = GETPOST('attrname', 'alpha');
59 73
 $elementtype = 'stock_mouvement'; //Must be the $table_element of the class that manage extrafield
60 74
 
61
-if (!$user->admin) accessforbidden();
75
+if (!$user->admin) {
76
+	accessforbidden();
77
+}
62 78
 
63 79
 
64 80
 /*
Please login to merge, or discard this patch.
htdocs/product/reassort.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -159,10 +159,10 @@  discard block
 block discarded – undo
159 159
 	}
160 160
 	$sql .= "(";
161 161
 	$sql .= " SELECT cp.fk_categorie, cp.fk_product";
162
-	$sql .= " FROM " . MAIN_DB_PREFIX . "categorie_product as cp";
162
+	$sql .= " FROM ".MAIN_DB_PREFIX."categorie_product as cp";
163 163
 	$sql .= " WHERE cp.fk_product = p.rowid"; // Join for the needed table to filter by categ
164 164
 	if ($search_categ > 0) {
165
-		$sql .= " AND cp.fk_categorie = " . ((int) $search_categ);
165
+		$sql .= " AND cp.fk_categorie = ".((int) $search_categ);
166 166
 	}
167 167
 	$sql .= ")";
168 168
 }
@@ -210,8 +210,8 @@  discard block
 block discarded – undo
210 210
 }
211 211
 if ($search_stock_physique != '') {
212 212
 	//$natural_search_physique = natural_search('HAVING SUM(' . $db->ifsql('s.reel IS NULL', '0', 's.reel') . ')', $search_stock_physique, 1, 1);
213
-	$natural_search_physique = natural_search('SUM(' . $db->ifsql('s.reel IS NULL', '0', 's.reel') . ')', $search_stock_physique, 1, 1);
214
-	$natural_search_physique = " " . substr($natural_search_physique, 1, -1); // remove first "(" and last ")" characters
213
+	$natural_search_physique = natural_search('SUM('.$db->ifsql('s.reel IS NULL', '0', 's.reel').')', $search_stock_physique, 1, 1);
214
+	$natural_search_physique = " ".substr($natural_search_physique, 1, -1); // remove first "(" and last ")" characters
215 215
 	if (!empty($sql_having)) {
216 216
 		$sql_having .= " AND";
217 217
 	} else {
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 		$param .= "&sbarcode=".urlencode($sbarcode);
299 299
 	}
300 300
 	if ($search_stock_physique) {
301
-		$param .= '&search_stock_physique=' . urlencode($search_stock_physique);
301
+		$param .= '&search_stock_physique='.urlencode($search_stock_physique);
302 302
 	}
303 303
 
304 304
 	llxHeader("", $texte, $helpurl);
Please login to merge, or discard this patch.
htdocs/product/stock/class/api_stockmovements.class.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@
 block discarded – undo
156 156
 	 * $price Can be set to update AWP (Average Weighted Price) when you make a stock increase
157 157
 	 * $dlc Eat-by date. Will be used if lot does not exists yet and will be created.
158 158
 	 * $dluo Sell-by date. Will be used if lot does not exists yet and will be created.
159
-		 *
159
+	 *
160 160
 	 * @param int $product_id Id product id {@min 1} {@from body} {@required true}
161 161
 	 * @param int $warehouse_id Id warehouse {@min 1} {@from body} {@required true}
162 162
 	 * @param float $qty Qty to add (Use negative value for a stock decrease) {@from body} {@required true}
Please login to merge, or discard this patch.
htdocs/install/step5.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -214,8 +214,8 @@
 block discarded – undo
214 214
 			$newuser->admin = 1;
215 215
 			$newuser->entity = 0;
216 216
 
217
-			$conf->global->USER_MAIL_REQUIRED = 0; 			// Force global option to be sure to create a new user with no email
218
-			$conf->global->USER_PASSWORD_GENERATED = '';	// To not use any rule for password validation
217
+			$conf->global->USER_MAIL_REQUIRED = 0; // Force global option to be sure to create a new user with no email
218
+			$conf->global->USER_PASSWORD_GENERATED = ''; // To not use any rule for password validation
219 219
 
220 220
 			$result = $newuser->create($createuser, 1);
221 221
 			if ($result > 0) {
Please login to merge, or discard this patch.
htdocs/paypal/lib/paypal.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -503,7 +503,7 @@
 block discarded – undo
503 503
 	// Turning on or off the ssl target certificate
504 504
 	if ($ssl_verifypeer < 0) {
505 505
 		global $dolibarr_main_prod;
506
-		$ssl_verifypeer =  ($dolibarr_main_prod ? true : false);
506
+		$ssl_verifypeer = ($dolibarr_main_prod ? true : false);
507 507
 	}
508 508
 	if (!empty($conf->global->MAIN_CURL_DISABLE_VERIFYPEER)) {
509 509
 		$ssl_verifypeer = 0;
Please login to merge, or discard this patch.
htdocs/takepos/index.php 2 patches
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -444,7 +444,10 @@
 block discarded – undo
444 444
 		if (idproduct=="") return;
445 445
 		// Call page invoice.php to generate the section with product lines
446 446
 		$("#poslines").load("invoice.php?action=addline&token=<?php echo newToken() ?>&place="+place+"&idproduct="+idproduct+"&selectedline="+selectedline+"&qty="+qty, function() {
447
-			<?php if (!empty($conf->global->TAKEPOS_CUSTOMER_DISPLAY)) echo "CustomerDisplay();";?>
447
+			<?php if (!empty($conf->global->TAKEPOS_CUSTOMER_DISPLAY)) {
448
+	echo "CustomerDisplay();";
449
+}
450
+?>
448 451
 		});
449 452
 	}
450 453
 
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 $arrayofcss = array('/takepos/css/pos.css.php', '/takepos/css/colorbox.css');
119 119
 
120 120
 if (getDolGlobalInt('TAKEPOS_COLOR_THEME') == 1) {
121
-	$arrayofcss[] =  '/takepos/css/colorful.css';
121
+	$arrayofcss[] = '/takepos/css/colorful.css';
122 122
 }
123 123
 
124 124
 
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
 		limit = maxproduct-1;
332 332
 	}
333 333
 	// Only show products for sale (tosell=1)
334
-	$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken();?>&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&category='+currentcat+'&tosell=1&limit='+limit+'&offset=0', function(data) {
334
+	$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken(); ?>&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&category='+currentcat+'&tosell=1&limit='+limit+'&offset=0', function(data) {
335 335
 		console.log("Call ajax.php (in LoadProducts) to get Products of category "+currentcat+" then loop on result to fill image thumbs");
336 336
 		console.log(data);
337 337
 		while (ishow < maxproduct) {
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 
388 388
 				<?php
389 389
 				// Add js from hooks
390
-				$parameters=array();
390
+				$parameters = array();
391 391
 				$parameters['caller'] = 'loadProducts';
392 392
 				$hookmanager->executeHooks('completeJSProductDisplay', $parameters);
393 393
 				print $hookmanager->resPrint;
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
 	}
432 432
 	var offset = <?php echo ($MAXPRODUCT - 2); ?> * pageproducts;
433 433
 	// Only show products for sale (tosell=1)
434
-	$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken();?>&category='+currentcat+'&tosell=1&limit='+limit+'&offset='+offset, function(data) {
434
+	$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken(); ?>&category='+currentcat+'&tosell=1&limit='+limit+'&offset='+offset, function(data) {
435 435
 		console.log("Call ajax.php (in MoreProducts) to get Products of category "+currentcat);
436 436
 
437 437
 		if (typeof (data[0]) == "undefined" && moreorless=="more"){ // Return if no more pages
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
 		if (idproduct=="") return;
493 493
 		// Call page invoice.php to generate the section with product lines
494 494
 		$("#poslines").load("invoice.php?action=addline&token=<?php echo newToken() ?>&place="+place+"&idproduct="+idproduct+"&selectedline="+selectedline+"&qty="+qty, function() {
495
-			<?php if (!empty($conf->global->TAKEPOS_CUSTOMER_DISPLAY)) echo "CustomerDisplay();";?>
495
+			<?php if (!empty($conf->global->TAKEPOS_CUSTOMER_DISPLAY)) echo "CustomerDisplay();"; ?>
496 496
 		});
497 497
 	}
498 498
 
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
 function ChangeThirdparty(idcustomer) {
503 503
 	 console.log("ChangeThirdparty");
504 504
 		// Call page list.php to change customer
505
-		$("#poslines").load("../societe/list.php?action=change&token=<?php echo newToken();?>&type=t&contextpage=poslist&idcustomer="+idcustomer+"&place="+place+"", function() {
505
+		$("#poslines").load("../societe/list.php?action=change&token=<?php echo newToken(); ?>&type=t&contextpage=poslist&idcustomer="+idcustomer+"&place="+place+"", function() {
506 506
 		});
507 507
 
508 508
 	ClearSearch();
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
 
575 575
 	console.log("New with place = <?php echo $place; ?>, js place="+place+", invoiceid="+invoiceid);
576 576
 
577
-	$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getInvoice&token=<?php echo newToken();?>&id='+invoiceid, function(data) {
577
+	$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getInvoice&token=<?php echo newToken(); ?>&id='+invoiceid, function(data) {
578 578
 		var r;
579 579
 
580 580
 		if (parseInt(data['paye']) === 1) {
@@ -644,7 +644,7 @@  discard block
 block discarded – undo
644 644
 			pageproducts = 0;
645 645
 			jQuery(".wrapper2 .catwatermark").hide();
646 646
 			var nbsearchresults = 0;
647
-			$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=search&token=<?php echo newToken();?>&term=' + search_term + '&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&search_start=' + search_start + '&search_limit=' + search_limit, function (data) {
647
+			$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=search&token=<?php echo newToken(); ?>&term=' + search_term + '&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&search_start=' + search_start + '&search_limit=' + search_limit, function (data) {
648 648
 				for (i = 0; i < <?php echo $MAXPRODUCT ?>; i++) {
649 649
 					if (typeof (data[i]) == "undefined") {
650 650
 						$("#prowatermark" + i).html("");
@@ -688,7 +688,7 @@  discard block
 block discarded – undo
688 688
 
689 689
 					<?php
690 690
 					// Add js from hooks
691
-					$parameters=array();
691
+					$parameters = array();
692 692
 					$parameters['caller'] = 'search2';
693 693
 					$hookmanager->executeHooks('completeJSProductDisplay', $parameters);
694 694
 					print $hookmanager->resPrint;
@@ -726,7 +726,7 @@  discard block
 block discarded – undo
726 726
 				}
727 727
 				else {
728 728
 					$("#prodiv<?php echo $MAXPRODUCT - 2; ?> span").show();
729
-					var search_start_less = Math.max(0, parseInt(search_start) - parseInt(<?php echo $MAXPRODUCT - 2;?>));
729
+					var search_start_less = Math.max(0, parseInt(search_start) - parseInt(<?php echo $MAXPRODUCT - 2; ?>));
730 730
 					$("#search_start_less").val(search_start_less);
731 731
 				}
732 732
 				if (nbsearchresults != <?php echo $MAXPRODUCT - 2; ?>) {
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
 				}
735 735
 				else {
736 736
 					$("#prodiv<?php echo $MAXPRODUCT - 1; ?> span").show();
737
-					var search_start_more = parseInt(search_start) + parseInt(<?php echo $MAXPRODUCT - 2;?>);
737
+					var search_start_more = parseInt(search_start) + parseInt(<?php echo $MAXPRODUCT - 2; ?>);
738 738
 					$("#search_start_more").val(search_start_more);
739 739
 				}
740 740
 			});
@@ -831,14 +831,14 @@  discard block
 block discarded – undo
831 831
 
832 832
 function TakeposPrintingOrder(){
833 833
 	console.log("TakeposPrintingOrder");
834
-	$("#poslines").load("invoice.php?action=order&token=<?php echo newToken();?>&place="+place, function() {
834
+	$("#poslines").load("invoice.php?action=order&token=<?php echo newToken(); ?>&place="+place, function() {
835 835
 		//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
836 836
 	});
837 837
 }
838 838
 
839 839
 function TakeposPrintingTemp(){
840 840
 	console.log("TakeposPrintingTemp");
841
-	$("#poslines").load("invoice.php?action=temp&token=<?php echo newToken();?>&place="+place, function() {
841
+	$("#poslines").load("invoice.php?action=temp&token=<?php echo newToken(); ?>&place="+place, function() {
842 842
 		//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
843 843
 	});
844 844
 }
@@ -860,7 +860,7 @@  discard block
 block discarded – undo
860 860
 }
861 861
 
862 862
 function DolibarrOpenDrawer() {
863
-	console.log("DolibarrOpenDrawer call ajax url /takepos/ajax/ajax.php?action=opendrawer&token=<?php echo newToken();?>&term=<?php print urlencode($_SESSION["takeposterminal"]); ?>");
863
+	console.log("DolibarrOpenDrawer call ajax url /takepos/ajax/ajax.php?action=opendrawer&token=<?php echo newToken(); ?>&term=<?php print urlencode($_SESSION["takeposterminal"]); ?>");
864 864
 	$.ajax({
865 865
 		type: "GET",
866 866
 		data: { token: '<?php echo currentToken(); ?>' },
@@ -1200,15 +1200,15 @@  discard block
 block discarded – undo
1200 1200
 
1201 1201
 // TakePOS setup check
1202 1202
 if (isset($_SESSION["takeposterminal"]) && $_SESSION["takeposterminal"]) {
1203
-	$sql = "SELECT code, libelle FROM " . MAIN_DB_PREFIX . "c_paiement";
1204
-	$sql .= " WHERE entity IN (" . getEntity('c_paiement') . ")";
1203
+	$sql = "SELECT code, libelle FROM ".MAIN_DB_PREFIX."c_paiement";
1204
+	$sql .= " WHERE entity IN (".getEntity('c_paiement').")";
1205 1205
 	$sql .= " AND active = 1";
1206 1206
 	$sql .= " ORDER BY libelle";
1207 1207
 
1208 1208
 	$resql          = $db->query($sql);
1209 1209
 	$paiementsModes = array();
1210 1210
 	if ($resql) {
1211
-		while ( $obj = $db->fetch_object($resql) ) {
1211
+		while ($obj = $db->fetch_object($resql)) {
1212 1212
 			$paycode = $obj->code;
1213 1213
 			if ($paycode == 'LIQ') {
1214 1214
 				$paycode = 'CASH';
@@ -1217,9 +1217,9 @@  discard block
 block discarded – undo
1217 1217
 				$paycode = 'CHEQUE';
1218 1218
 			}
1219 1219
 
1220
-			$constantforkey = "CASHDESK_ID_BANKACCOUNT_" . $paycode . $_SESSION["takeposterminal"];
1220
+			$constantforkey = "CASHDESK_ID_BANKACCOUNT_".$paycode.$_SESSION["takeposterminal"];
1221 1221
 			//var_dump($constantforkey.' '.$conf->global->$constantforkey);
1222
-			if ( !empty($conf->global->$constantforkey) && $conf->global->$constantforkey > 0) {
1222
+			if (!empty($conf->global->$constantforkey) && $conf->global->$constantforkey > 0) {
1223 1223
 				array_push($paiementsModes, $obj);
1224 1224
 			}
1225 1225
 		}
@@ -1255,7 +1255,7 @@  discard block
 block discarded – undo
1255 1255
 if (!empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
1256 1256
 	$menus[$r++] = array('title'=>'<span class="far fa-building paddingrightonly"></span><div class="trunc">'.$langs->trans("Customer").'</div>', 'action'=>'Customer();');
1257 1257
 }
1258
-if ( ! getDolGlobalString('TAKEPOS_HIDE_HISTORY')) {
1258
+if (!getDolGlobalString('TAKEPOS_HIDE_HISTORY')) {
1259 1259
 	$menus[$r++] = array('title'=>'<span class="fa fa-history paddingrightonly"></span><div class="trunc">'.$langs->trans("History").'</div>', 'action'=>'History();');
1260 1260
 }
1261 1261
 $menus[$r++] = array('title'=>'<span class="fa fa-cube paddingrightonly"></span><div class="trunc">'.$langs->trans("FreeZone").'</div>', 'action'=>'FreeZone();');
@@ -1325,7 +1325,7 @@  discard block
 block discarded – undo
1325 1325
 $parameters = array('menus'=>$menus);
1326 1326
 $reshook = $hookmanager->executeHooks('ActionButtons', $parameters);
1327 1327
 if ($reshook == 0) {  //add buttons
1328
-	if (is_array($hookmanager->resArray) ) {
1328
+	if (is_array($hookmanager->resArray)) {
1329 1329
 		foreach ($hookmanager->resArray as $resArray) {
1330 1330
 			foreach ($resArray as $butmenu) {
1331 1331
 				$menus[$r++] = $butmenu;
@@ -1333,7 +1333,7 @@  discard block
 block discarded – undo
1333 1333
 		}
1334 1334
 	} elseif ($reshook == 1) {
1335 1335
 		$r = 0; //replace buttons
1336
-		if (is_array($hookmanager->resArray) ) {
1336
+		if (is_array($hookmanager->resArray)) {
1337 1337
 			foreach ($hookmanager->resArray as $resArray) {
1338 1338
 				foreach ($resArray as $butmenu) {
1339 1339
 					$menus[$r++] = $butmenu;
Please login to merge, or discard this patch.
htdocs/don/class/don.class.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -954,7 +954,7 @@
 block discarded – undo
954 954
 		}
955 955
 		$result .= $linkend;
956 956
 		global $action;
957
-		$hookmanager->initHooks(array($this->element . 'dao'));
957
+		$hookmanager->initHooks(array($this->element.'dao'));
958 958
 		$parameters = array('id'=>$this->id, 'getnomurl' => &$result);
959 959
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
960 960
 		if ($reshook > 0) {
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -715,12 +715,12 @@
 block discarded – undo
715 715
 	}
716 716
 
717 717
 		/**
718
-	 *	Return clicable link of object (with eventually picto)
719
-	 *
720
-	 *	@param      string	    $option                 Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
721
-	 *  @param		array		$arraydata				Array of data
722
-	 *  @return		string								HTML Code for Kanban thumb.
723
-	 */
718
+		 *	Return clicable link of object (with eventually picto)
719
+		 *
720
+		 *	@param      string	    $option                 Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
721
+		 *  @param		array		$arraydata				Array of data
722
+		 *  @return		string								HTML Code for Kanban thumb.
723
+		 */
724 724
 	public function getKanbanView($option = '', $arraydata = null)
725 725
 	{
726 726
 		global $langs;
Please login to merge, or discard this patch.
htdocs/reception/class/reception.class.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -740,7 +740,9 @@
 block discarded – undo
740 740
 				$this->fetch_origin();
741 741
 				if (empty($this->commandeFournisseur->lines)) {
742 742
 					$res = $this->commandeFournisseur->fetch_lines();
743
-					if ($res < 0)	return $res;
743
+					if ($res < 0) {
744
+						return $res;
745
+					}
744 746
 				}
745 747
 			}
746 748
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1264,7 +1264,7 @@  discard block
 block discarded – undo
1264 1264
 		$result .= $linkend;
1265 1265
 
1266 1266
 		global $action;
1267
-		$hookmanager->initHooks(array($this->element . 'dao'));
1267
+		$hookmanager->initHooks(array($this->element.'dao'));
1268 1268
 		$parameters = array('id'=>$this->id, 'getnomurl' => &$result);
1269 1269
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
1270 1270
 		if ($reshook > 0) {
@@ -1310,7 +1310,7 @@  discard block
 block discarded – undo
1310 1310
 		if (getDolGlobalInt("STOCK_CALCULATE_ON_RECEPTION_CLOSE")) {
1311 1311
 			$this->labelStatus[1]  = 'StatusReceptionValidatedToReceive';
1312 1312
 		}
1313
-		$this->labelStatus[2]  = 'StatusReceptionProcessed';
1313
+		$this->labelStatus[2] = 'StatusReceptionProcessed';
1314 1314
 
1315 1315
 		// List of short language codes for status
1316 1316
 		$this->labelStatusShort[-1] = 'StatusReceptionCanceledShort';
@@ -1381,7 +1381,7 @@  discard block
 block discarded – undo
1381 1381
 		while ($xnbp < $nbp) {
1382 1382
 			$line = new CommandeFournisseurDispatch($this->db);
1383 1383
 			$line->desc = $langs->trans("Description")." ".$xnbp;
1384
-			$line->libelle = $langs->trans("Description")." ".$xnbp;	// deprecated
1384
+			$line->libelle = $langs->trans("Description")." ".$xnbp; // deprecated
1385 1385
 			$line->label = $langs->trans("Description")." ".$xnbp;
1386 1386
 			$line->qty = 10;
1387 1387
 
Please login to merge, or discard this patch.
htdocs/hrm/class/position.class.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -914,11 +914,11 @@
 block discarded – undo
914 914
 
915 915
 
916 916
 		/**
917
-	 *    Load the info information in the object
918
-	 *
919
-	 * @param int $id Id of object
920
-	 * @return    void
921
-	 */
917
+		 *    Load the info information in the object
918
+		 *
919
+		 * @param int $id Id of object
920
+		 * @return    void
921
+		 */
922 922
 	public function info($id)
923 923
 	{
924 924
 		$sql = 'SELECT rowid, date_creation as datec, tms as datem,';
Please login to merge, or discard this patch.
Spacing   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 
28 28
 // Put here all includes required by your class file
29
-require_once DOL_DOCUMENT_ROOT . '/core/class/commonobject.class.php';
29
+require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
30 30
 //require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
31 31
 //require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
32 32
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	/**
103 103
 	 * @var array  Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
104 104
 	 */
105
-	public $fields=array(
105
+	public $fields = array(
106 106
 		'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>2, 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
107 107
 		//'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>20, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of object"),
108 108
 		'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
@@ -268,10 +268,10 @@  discard block
 block discarded – undo
268 268
 
269 269
 		// Clear fields
270 270
 		if (property_exists($object, 'ref')) {
271
-			$object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_" . $object->ref : $this->fields['ref']['default'];
271
+			$object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default'];
272 272
 		}
273 273
 		if (property_exists($object, 'label')) {
274
-			$object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf") . " " . $object->label : $this->fields['label']['default'];
274
+			$object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default'];
275 275
 		}
276 276
 		if (property_exists($object, 'status')) {
277 277
 			$object->status = self::STATUS_DRAFT;
@@ -383,9 +383,9 @@  discard block
 block discarded – undo
383 383
 
384 384
 		$sql = 'SELECT ';
385 385
 		$sql .= $this->getFieldList('t');
386
-		$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';
386
+		$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t';
387 387
 		if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) {
388
-			$sql .= ' WHERE t.entity IN (' . getEntity($this->element) . ')';
388
+			$sql .= ' WHERE t.entity IN ('.getEntity($this->element).')';
389 389
 		} else {
390 390
 			$sql .= ' WHERE 1 = 1';
391 391
 		}
@@ -394,15 +394,15 @@  discard block
 block discarded – undo
394 394
 		if (count($filter) > 0) {
395 395
 			foreach ($filter as $key => $value) {
396 396
 				if ($key == 't.rowid') {
397
-					$sqlwhere[] = $key . '=' . $value;
397
+					$sqlwhere[] = $key.'='.$value;
398 398
 				} elseif ($key == 'customsql') {
399 399
 					$sqlwhere[] = $value;
400 400
 				} elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
401
-					$sqlwhere[] = $key . ' = \'' . $this->db->idate($value) . '\'';
401
+					$sqlwhere[] = $key.' = \''.$this->db->idate($value).'\'';
402 402
 				} elseif (strpos($value, '%') === false) {
403
-					$sqlwhere[] = $key . ' IN (' . $this->db->sanitize($this->db->escape($value)) . ')';
403
+					$sqlwhere[] = $key.' IN ('.$this->db->sanitize($this->db->escape($value)).')';
404 404
 				} else {
405
-					$sqlwhere[] = $key . ' LIKE \'%' . $this->db->escape($value) . '%\'';
405
+					$sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\'';
406 406
 				}
407 407
 			}
408 408
 		}
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 			$sql .= $this->db->order($sortfield, $sortorder);
415 415
 		}
416 416
 		if (!empty($limit)) {
417
-			$sql .= ' ' . $this->db->plimit($limit, $offset);
417
+			$sql .= ' '.$this->db->plimit($limit, $offset);
418 418
 		}
419 419
 
420 420
 		$resql = $this->db->query($sql);
@@ -435,8 +435,8 @@  discard block
 block discarded – undo
435 435
 
436 436
 			return $records;
437 437
 		} else {
438
-			$this->errors[] = 'Error ' . $this->db->lasterror();
439
-			dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
438
+			$this->errors[] = 'Error '.$this->db->lasterror();
439
+			dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
440 440
 
441 441
 			return -1;
442 442
 		}
@@ -497,13 +497,13 @@  discard block
 block discarded – undo
497 497
 	{
498 498
 		global $conf, $langs;
499 499
 
500
-		require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
500
+		require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
501 501
 
502 502
 		$error = 0;
503 503
 
504 504
 		// Protection
505 505
 		if ($this->status == self::STATUS_VALIDATED) {
506
-			dol_syslog(get_class($this) . "::validate action abandonned: already validated", LOG_WARNING);
506
+			dol_syslog(get_class($this)."::validate action abandonned: already validated", LOG_WARNING);
507 507
 			return 0;
508 508
 		}
509 509
 
@@ -529,18 +529,18 @@  discard block
 block discarded – undo
529 529
 
530 530
 		if (!empty($num)) {
531 531
 			// Validate
532
-			$sql = "UPDATE " . MAIN_DB_PREFIX . $this->table_element;
533
-			$sql .= " SET ref = '" . $this->db->escape($num) . "',";
534
-			$sql .= " status = " . self::STATUS_VALIDATED;
532
+			$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element;
533
+			$sql .= " SET ref = '".$this->db->escape($num)."',";
534
+			$sql .= " status = ".self::STATUS_VALIDATED;
535 535
 			if (!empty($this->fields['date_validation'])) {
536
-				$sql .= ", date_validation = '" . $this->db->idate($now) . "'";
536
+				$sql .= ", date_validation = '".$this->db->idate($now)."'";
537 537
 			}
538 538
 			if (!empty($this->fields['fk_user_valid'])) {
539
-				$sql .= ", fk_user_valid = " . ((int) $user->id);
539
+				$sql .= ", fk_user_valid = ".((int) $user->id);
540 540
 			}
541
-			$sql .= " WHERE rowid = " . ((int) $this->id);
541
+			$sql .= " WHERE rowid = ".((int) $this->id);
542 542
 
543
-			dol_syslog(get_class($this) . "::validate()", LOG_DEBUG);
543
+			dol_syslog(get_class($this)."::validate()", LOG_DEBUG);
544 544
 			$resql = $this->db->query($sql);
545 545
 			if (!$resql) {
546 546
 				dol_print_error($this->db);
@@ -564,8 +564,8 @@  discard block
 block discarded – undo
564 564
 			// Rename directory if dir was a temporary ref
565 565
 			if (preg_match('/^[\(]?PROV/i', $this->ref)) {
566 566
 				// Now we rename also files into index
567
-				$sql = 'UPDATE ' . MAIN_DB_PREFIX . "ecm_files set filename = CONCAT('" . $this->db->escape($this->newref) . "', SUBSTR(filename, " . (strlen($this->ref) + 1) . ")), filepath = 'position/" . $this->db->escape($this->newref) . "'";
568
-				$sql .= " WHERE filename LIKE '" . $this->db->escape($this->ref) . "%' AND filepath = 'position/" . $this->db->escape($this->ref) . "' and entity = " . $conf->entity;
567
+				$sql = 'UPDATE '.MAIN_DB_PREFIX."ecm_files set filename = CONCAT('".$this->db->escape($this->newref)."', SUBSTR(filename, ".(strlen($this->ref) + 1).")), filepath = 'position/".$this->db->escape($this->newref)."'";
568
+				$sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'position/".$this->db->escape($this->ref)."' and entity = ".$conf->entity;
569 569
 				$resql = $this->db->query($sql);
570 570
 				if (!$resql) {
571 571
 					$error++;
@@ -575,20 +575,20 @@  discard block
 block discarded – undo
575 575
 				// We rename directory ($this->ref = old ref, $num = new ref) in order not to lose the attachments
576 576
 				$oldref = dol_sanitizeFileName($this->ref);
577 577
 				$newref = dol_sanitizeFileName($num);
578
-				$dirsource = $conf->hrm->dir_output . '/position/' . $oldref;
579
-				$dirdest = $conf->hrm->dir_output . '/position/' . $newref;
578
+				$dirsource = $conf->hrm->dir_output.'/position/'.$oldref;
579
+				$dirdest = $conf->hrm->dir_output.'/position/'.$newref;
580 580
 				if (!$error && file_exists($dirsource)) {
581
-					dol_syslog(get_class($this) . "::validate() rename dir " . $dirsource . " into " . $dirdest);
581
+					dol_syslog(get_class($this)."::validate() rename dir ".$dirsource." into ".$dirdest);
582 582
 
583 583
 					if (@rename($dirsource, $dirdest)) {
584 584
 						dol_syslog("Rename ok");
585 585
 						// Rename docs starting with $oldref with $newref
586
-						$listoffiles = dol_dir_list($conf->hrm->dir_output . '/position/' . $newref, 'files', 1, '^' . preg_quote($oldref, '/'));
586
+						$listoffiles = dol_dir_list($conf->hrm->dir_output.'/position/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/'));
587 587
 						foreach ($listoffiles as $fileentry) {
588 588
 							$dirsource = $fileentry['name'];
589
-							$dirdest = preg_replace('/^' . preg_quote($oldref, '/') . '/', $newref, $dirsource);
590
-							$dirsource = $fileentry['path'] . '/' . $dirsource;
591
-							$dirdest = $fileentry['path'] . '/' . $dirdest;
589
+							$dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource);
590
+							$dirsource = $fileentry['path'].'/'.$dirsource;
591
+							$dirdest = $fileentry['path'].'/'.$dirdest;
592 592
 							@rename($dirsource, $dirdest);
593 593
 						}
594 594
 					}
@@ -704,14 +704,14 @@  discard block
 block discarded – undo
704 704
 
705 705
 		$result = '';
706 706
 
707
-		$label = img_picto('', $this->picto) . ' <u>' . $langs->trans("Position") . '</u>';
707
+		$label = img_picto('', $this->picto).' <u>'.$langs->trans("Position").'</u>';
708 708
 		if (isset($this->status)) {
709
-			$label .= ' ' . $this->getLibStatut(5);
709
+			$label .= ' '.$this->getLibStatut(5);
710 710
 		}
711 711
 		$label .= '<br>';
712
-		$label .= '<b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
712
+		$label .= '<b>'.$langs->trans('Ref').':</b> '.$this->ref;
713 713
 
714
-		$url = dol_buildpath('/hrm/position_card.php', 1) . '?id=' . $this->id;
714
+		$url = dol_buildpath('/hrm/position_card.php', 1).'?id='.$this->id;
715 715
 
716 716
 		if ($option != 'nolink') {
717 717
 			// Add param to save lastsearch_values or not
@@ -728,20 +728,20 @@  discard block
 block discarded – undo
728 728
 		if (empty($notooltip)) {
729 729
 			if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
730 730
 				$label = $langs->trans("ShowPosition");
731
-				$linkclose .= ' alt="' . dol_escape_htmltag($label, 1) . '"';
731
+				$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
732 732
 			}
733
-			$linkclose .= ' title="' . dol_escape_htmltag($label, 1) . '"';
734
-			$linkclose .= ' class="classfortooltip' . ($morecss ? ' ' . $morecss : '') . '"';
733
+			$linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"';
734
+			$linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"';
735 735
 		} else {
736
-			$linkclose = ($morecss ? ' class="' . $morecss . '"' : '');
736
+			$linkclose = ($morecss ? ' class="'.$morecss.'"' : '');
737 737
 		}
738 738
 
739 739
 		if ($option == 'nolink') {
740 740
 			$linkstart = '<span';
741 741
 		} else {
742
-			$linkstart = '<a href="' . $url . '"';
742
+			$linkstart = '<a href="'.$url.'"';
743 743
 		}
744
-		$linkstart .= $linkclose . '>';
744
+		$linkstart .= $linkclose.'>';
745 745
 		if ($option == 'nolink') {
746 746
 			$linkend = '</span>';
747 747
 		} else {
@@ -752,29 +752,29 @@  discard block
 block discarded – undo
752 752
 
753 753
 		if (empty($this->showphoto_on_popup)) {
754 754
 			if ($withpicto) {
755
-				$result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="' . (($withpicto != 2) ? 'paddingright ' : '') . 'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
755
+				$result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
756 756
 			}
757 757
 		} else {
758 758
 			if ($withpicto) {
759
-				require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
759
+				require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
760 760
 
761 761
 				list($class, $module) = explode('@', $this->picto);
762
-				$upload_dir = $conf->$module->multidir_output[$conf->entity] . "/$class/" . dol_sanitizeFileName($this->ref);
762
+				$upload_dir = $conf->$module->multidir_output[$conf->entity]."/$class/".dol_sanitizeFileName($this->ref);
763 763
 				$filearray = dol_dir_list($upload_dir, "files");
764 764
 				$filename = $filearray[0]['name'];
765 765
 				if (!empty($filename)) {
766 766
 					$pospoint = strpos($filearray[0]['name'], '.');
767 767
 
768
-					$pathtophoto = $class . '/' . $this->ref . '/thumbs/' . substr($filename, 0, $pospoint) . '_mini' . substr($filename, $pospoint);
769
-					if (!getDolGlobalString(strtoupper($module . '_' . $class) . '_FORMATLISTPHOTOSASUSERS')) {
770
-						$result .= '<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo' . $module . '" alt="No photo" border="0" src="' . DOL_URL_ROOT . '/viewimage.php?modulepart=' . $module . '&entity=' . $conf->entity . '&file=' . urlencode($pathtophoto) . '"></div></div>';
768
+					$pathtophoto = $class.'/'.$this->ref.'/thumbs/'.substr($filename, 0, $pospoint).'_mini'.substr($filename, $pospoint);
769
+					if (!getDolGlobalString(strtoupper($module.'_'.$class).'_FORMATLISTPHOTOSASUSERS')) {
770
+						$result .= '<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$module.'" alt="No photo" border="0" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$module.'&entity='.$conf->entity.'&file='.urlencode($pathtophoto).'"></div></div>';
771 771
 					} else {
772
-						$result .= '<div class="floatleft inline-block valignmiddle divphotoref"><img class="photouserphoto userphoto" alt="No photo" border="0" src="' . DOL_URL_ROOT . '/viewimage.php?modulepart=' . $module . '&entity=' . $conf->entity . '&file=' . urlencode($pathtophoto) . '"></div>';
772
+						$result .= '<div class="floatleft inline-block valignmiddle divphotoref"><img class="photouserphoto userphoto" alt="No photo" border="0" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$module.'&entity='.$conf->entity.'&file='.urlencode($pathtophoto).'"></div>';
773 773
 					}
774 774
 
775 775
 					$result .= '</div>';
776 776
 				} else {
777
-					$result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="' . (($withpicto != 2) ? 'paddingright ' : '') . 'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
777
+					$result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
778 778
 				}
779 779
 			}
780 780
 		}
@@ -833,7 +833,7 @@  discard block
 block discarded – undo
833 833
 			$this->labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Disabled');
834 834
 		}
835 835
 
836
-		$statusType = 'status' . $status;
836
+		$statusType = 'status'.$status;
837 837
 		//if ($status == self::STATUS_VALIDATED) $statusType = 'status1';
838 838
 		if ($status == self::STATUS_CANCELED) {
839 839
 			$statusType = 'status6';
@@ -923,8 +923,8 @@  discard block
 block discarded – undo
923 923
 	{
924 924
 		$sql = 'SELECT rowid, date_creation as datec, tms as datem,';
925 925
 		$sql .= ' fk_user_creat, fk_user_modif';
926
-		$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';
927
-		$sql .= ' WHERE t.rowid = ' . ((int) $id);
926
+		$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t';
927
+		$sql .= ' WHERE t.rowid = '.((int) $id);
928 928
 		$result = $this->db->query($sql);
929 929
 		if ($result) {
930 930
 			if ($this->db->num_rows($result)) {
@@ -968,7 +968,7 @@  discard block
 block discarded – undo
968 968
 		$this->lines = array();
969 969
 
970 970
 		$objectline = new PositionLine($this->db);
971
-		$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql' => 'fk_position = ' . $this->id));
971
+		$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql' => 'fk_position = '.$this->id));
972 972
 
973 973
 		if (is_numeric($result)) {
974 974
 			$this->error = $objectline->error;
@@ -997,20 +997,20 @@  discard block
 block discarded – undo
997 997
 		if (!empty($conf->global->hrm_POSITION_ADDON)) {
998 998
 			$mybool = false;
999 999
 
1000
-			$file = $conf->global->hrm_POSITION_ADDON . ".php";
1000
+			$file = $conf->global->hrm_POSITION_ADDON.".php";
1001 1001
 			$classname = $conf->global->hrm_POSITION_ADDON;
1002 1002
 
1003 1003
 			// Include file with class
1004 1004
 			$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
1005 1005
 			foreach ($dirmodels as $reldir) {
1006
-				$dir = dol_buildpath($reldir . "core/modules/hrm/");
1006
+				$dir = dol_buildpath($reldir."core/modules/hrm/");
1007 1007
 
1008 1008
 				// Load file with numbering class (if found)
1009
-				$mybool |= @include_once $dir . $file;
1009
+				$mybool |= @include_once $dir.$file;
1010 1010
 			}
1011 1011
 
1012 1012
 			if ($mybool === false) {
1013
-				dol_print_error('', "Failed to include file " . $file);
1013
+				dol_print_error('', "Failed to include file ".$file);
1014 1014
 				return '';
1015 1015
 			}
1016 1016
 
@@ -1026,7 +1026,7 @@  discard block
 block discarded – undo
1026 1026
 					return "";
1027 1027
 				}
1028 1028
 			} else {
1029
-				print $langs->trans("Error") . " " . $langs->trans("ClassNotFound") . ' ' . $classname;
1029
+				print $langs->trans("Error")." ".$langs->trans("ClassNotFound").' '.$classname;
1030 1030
 				return "";
1031 1031
 			}
1032 1032
 		} else {
@@ -1045,7 +1045,7 @@  discard block
 block discarded – undo
1045 1045
 	{
1046 1046
 		$TPosition = array();
1047 1047
 
1048
-		$TPosition = $this->fetchAll('ASC', 't.rowid', 0, 0, array('customsql' => 'fk_user=' . $userid));
1048
+		$TPosition = $this->fetchAll('ASC', 't.rowid', 0, 0, array('customsql' => 'fk_user='.$userid));
1049 1049
 
1050 1050
 		return $TPosition;
1051 1051
 	}
@@ -1159,7 +1159,7 @@  discard block
 block discarded – undo
1159 1159
 }
1160 1160
 
1161 1161
 
1162
-require_once DOL_DOCUMENT_ROOT . '/core/class/commonobjectline.class.php';
1162
+require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php';
1163 1163
 
1164 1164
 /**
1165 1165
  * Class PositionLine. You can also remove this and generate a CRUD class for lines objects.
Please login to merge, or discard this patch.