Completed
Branch develop (68d67a)
by
unknown
16:20
created
htdocs/core/db/DoliDB.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,10 +119,10 @@
 block discarded – undo
119 119
 	public function regexpsql($subject, $pattern, $sqlstring = false)
120 120
 	{
121 121
 		if ($sqlstring) {
122
-			return "(". $subject ." REGEXP '" . $pattern . "')";
122
+			return "(".$subject." REGEXP '".$pattern."')";
123 123
 		}
124 124
 
125
-		return "('". $subject ."' REGEXP '" . $pattern . "')";
125
+		return "('".$subject."' REGEXP '".$pattern."')";
126 126
 	}
127 127
 
128 128
 
Please login to merge, or discard this patch.
htdocs/core/ajax/selectsearchbox.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
 if (isModEnabled('supplier_proposal') && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_PROPAL_DISABLED) && $user->hasRight('supplier_proposal', 'lire')) {
114 114
 	$arrayresult['searchintosupplierpropal'] = array('position'=>100, 'img'=>'object_supplier_proposal', 'label'=>$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_proposal', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/supplier_proposal/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : ''));
115 115
 }
116
-if (((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight('fournisseur', 'commande', 'lire')) || (isModEnabled('supplier_order') &&  $user->hasRight('supplier_order', 'lire'))) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED)) {
116
+if (((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight('fournisseur', 'commande', 'lire')) || (isModEnabled('supplier_order') && $user->hasRight('supplier_order', 'lire'))) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED)) {
117 117
 	$arrayresult['searchintosupplierorder'] = array('position'=>110, 'img'=>'object_supplier_order', 'label'=>$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_order', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/commande/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : ''));
118 118
 }
119 119
 if (((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight('fournisseur', 'facture', 'lire')) || (isModEnabled('supplier_invoice') && $user->hasRight('supplier_invoice', 'lire'))) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED)) {
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   +17 added lines, -17 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");
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 				} else {
319 319
 					dol_print_error($db);
320 320
 				}
321
-				dol_setcache($cachekey, $nbNotif, 120);		// If setting cache fails, this is not a problem, so we do not test result.
321
+				dol_setcache($cachekey, $nbNotif, 120); // If setting cache fails, this is not a problem, so we do not test result.
322 322
 			}
323 323
 
324 324
 			$head[$h][0] = DOL_URL_ROOT.'/societe/notify/card.php?socid='.urlencode($object->id);
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 			$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
362 362
 			$nbLinks = Link::count($db, $object->element, $object->id);
363 363
 			$totalAttached = $nbFiles + $nbLinks;
364
-			dol_setcache($cachekey, $totalAttached, 120);		// If setting cache fails, this is not a problem, so we do not test result.
364
+			dol_setcache($cachekey, $totalAttached, 120); // If setting cache fails, this is not a problem, so we do not test result.
365 365
 		}
366 366
 
367 367
 		$head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id;
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
 
376 376
 	$head[$h][0] = DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id;
377 377
 	$head[$h][1] = $langs->trans("Events");
378
-	if (isModEnabled('agenda')&& ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) {
378
+	if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) {
379 379
 		$nbEvent = 0;
380 380
 		// Enable caching of thirdparty count actioncomm
381 381
 		require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php';
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
 			} else {
395 395
 				dol_syslog('Failed to count actioncomm '.$db->lasterror(), LOG_ERR);
396 396
 			}
397
-			dol_setcache($cachekey, $nbEvent, 120);		// If setting cache fails, this is not a problem, so we do not test result.
397
+			dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result.
398 398
 		}
399 399
 
400 400
 		$head[$h][1] .= '/';
@@ -788,7 +788,7 @@  discard block
 block discarded – undo
788 788
 		return false;
789 789
 	}
790 790
 
791
-	$country_code_in_EEC = getCountriesInEEC();		// This make a database call but there is a cache done into $conf->cache['country_code_in_EEC']
791
+	$country_code_in_EEC = getCountriesInEEC(); // This make a database call but there is a cache done into $conf->cache['country_code_in_EEC']
792 792
 
793 793
 	//print "dd".$object->country_code;
794 794
 	return in_array($object->country_code, $country_code_in_EEC);
@@ -1354,7 +1354,7 @@  discard block
 block discarded – undo
1354 1354
 				print '<td class="nowrap center">';
1355 1355
 
1356 1356
 				// Add to agenda
1357
-				if (isModEnabled('agenda')&& $user->hasRight('agenda', 'myactions', 'create')) {
1357
+				if (isModEnabled('agenda') && $user->hasRight('agenda', 'myactions', 'create')) {
1358 1358
 					print '<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&actioncode=&contactid='.$obj->rowid.'&socid='.$object->id.'&backtopage='.urlencode($backtopage).'">';
1359 1359
 					print img_object($langs->trans("Event"), "action");
1360 1360
 					print '</a> &nbsp; ';
@@ -1432,7 +1432,7 @@  discard block
 block discarded – undo
1432 1432
 
1433 1433
 			if ($showuserlogin) {
1434 1434
 				print '<td class="tdoverflowmax125">';
1435
-				$tmpuser= new User($db);
1435
+				$tmpuser = new User($db);
1436 1436
 				$resfetch = $tmpuser->fetch(0, '', '', 0, -1, '', $contactstatic->id);
1437 1437
 				if ($resfetch > 0) {
1438 1438
 					print $tmpuser->getNomUrl(1, '', 0, 0, 24, 1);
@@ -1449,7 +1449,7 @@  discard block
 block discarded – undo
1449 1449
 				print '<td class="nowrap center">';
1450 1450
 
1451 1451
 				// Add to agenda
1452
-				if (isModEnabled('agenda')&& $user->hasRight('agenda', 'myactions', 'create')) {
1452
+				if (isModEnabled('agenda') && $user->hasRight('agenda', 'myactions', 'create')) {
1453 1453
 					print '<a href="'.DOL_URL_ROOT.'/comm/action/card.php?action=create&actioncode=&contactid='.$obj->rowid.'&socid='.$object->id.'&backtopage='.urlencode($backtopage).'">';
1454 1454
 					print img_object($langs->trans("Event"), "action");
1455 1455
 					print '</a> &nbsp; ';
@@ -1632,8 +1632,8 @@  discard block
 block discarded – undo
1632 1632
 
1633 1633
 		// Fields from hook
1634 1634
 		$parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon);
1635
-		$reshook = $hookmanager->executeHooks('showActionsDoneListSelect', $parameters);    // Note that $action and $object may have been modified by hook
1636
-		if (!empty($hookmanager->resPrint)) $sql.= $hookmanager->resPrint;
1635
+		$reshook = $hookmanager->executeHooks('showActionsDoneListSelect', $parameters); // Note that $action and $object may have been modified by hook
1636
+		if (!empty($hookmanager->resPrint)) $sql .= $hookmanager->resPrint;
1637 1637
 
1638 1638
 		$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a";
1639 1639
 		$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_action";
@@ -1648,8 +1648,8 @@  discard block
 block discarded – undo
1648 1648
 
1649 1649
 		// Fields from hook
1650 1650
 		$parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon);
1651
-		$reshook = $hookmanager->executeHooks('showActionsDoneListFrom', $parameters);    // Note that $action and $object may have been modified by hook
1652
-		if (!empty($hookmanager->resPrint)) $sql.= $hookmanager->resPrint;
1651
+		$reshook = $hookmanager->executeHooks('showActionsDoneListFrom', $parameters); // Note that $action and $object may have been modified by hook
1652
+		if (!empty($hookmanager->resPrint)) $sql .= $hookmanager->resPrint;
1653 1653
 
1654 1654
 		if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur'))) {
1655 1655
 			$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid";
@@ -1771,8 +1771,8 @@  discard block
 block discarded – undo
1771 1771
 
1772 1772
 		// Fields from hook
1773 1773
 		$parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon, 'module' => $module);
1774
-		$reshook = $hookmanager->executeHooks('showActionsDoneListWhere', $parameters);    // Note that $action and $object may have been modified by hook
1775
-		if (!empty($hookmanager->resPrint)) $sql.= $hookmanager->resPrint;
1774
+		$reshook = $hookmanager->executeHooks('showActionsDoneListWhere', $parameters); // Note that $action and $object may have been modified by hook
1775
+		if (!empty($hookmanager->resPrint)) $sql .= $hookmanager->resPrint;
1776 1776
 
1777 1777
 		if (is_array($actioncode)) {
1778 1778
 			foreach ($actioncode as $code) {
@@ -1880,7 +1880,7 @@  discard block
 block discarded – undo
1880 1880
 		}
1881 1881
 	}
1882 1882
 
1883
-	if (isModEnabled('agenda')|| (isModEnabled('mailing') && !empty($objcon->email))) {
1883
+	if (isModEnabled('agenda') || (isModEnabled('mailing') && !empty($objcon->email))) {
1884 1884
 		$delay_warning = $conf->global->MAIN_DELAY_ACTIONS_TODO * 24 * 60 * 60;
1885 1885
 
1886 1886
 		require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
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/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/societe/mod_codecompta_digitaria.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -295,11 +295,11 @@
 block discarded – undo
295 295
 		}
296 296
 
297 297
 		if (!empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) {
298
-			$sql = "SELECT " . $typethirdparty . " FROM " . MAIN_DB_PREFIX . "societe_perentity";
299
-			$sql .= " WHERE " . $typethirdparty . " = '" . $db->escape($code) . "'";
298
+			$sql = "SELECT ".$typethirdparty." FROM ".MAIN_DB_PREFIX."societe_perentity";
299
+			$sql .= " WHERE ".$typethirdparty." = '".$db->escape($code)."'";
300 300
 		} else {
301
-			$sql = "SELECT " . $typethirdparty . " FROM " . MAIN_DB_PREFIX . "societe";
302
-			$sql .= " WHERE " . $typethirdparty . " = '" . $db->escape($code) . "'";
301
+			$sql = "SELECT ".$typethirdparty." FROM ".MAIN_DB_PREFIX."societe";
302
+			$sql .= " WHERE ".$typethirdparty." = '".$db->escape($code)."'";
303 303
 		}
304 304
 		$sql .= " AND entity IN (".getEntity('societe').")";
305 305
 
Please login to merge, or discard this patch.