Completed
Branch develop (236e96)
by
unknown
19:23
created
htdocs/product/traduction.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -134,15 +134,15 @@  discard block
 block discarded – undo
134 134
 
135 135
 		foreach ($object->multilangs as $key => $value) { // enregistrement des nouvelles valeurs dans l'objet
136 136
 			if ($key == $current_lang) {
137
-				$object->label = GETPOST("libelle-" . $key);
138
-				$object->description = dol_htmlcleanlastbr(GETPOST("desc-" . $key, 'restricthtml'));
139
-				$object->other = dol_htmlcleanlastbr(GETPOST("other-" . $key, 'restricthtml'));
137
+				$object->label = GETPOST("libelle-".$key);
138
+				$object->description = dol_htmlcleanlastbr(GETPOST("desc-".$key, 'restricthtml'));
139
+				$object->other = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml'));
140 140
 
141 141
 				$object->update($object->id, $user);
142 142
 			} else {
143
-				$object->multilangs[$key]["label"] = GETPOST("libelle-" . $key);
144
-				$object->multilangs[$key]["description"] = dol_htmlcleanlastbr(GETPOST("desc-" . $key, 'restricthtml'));
145
-				$object->multilangs[$key]["other"] = dol_htmlcleanlastbr(GETPOST("other-" . $key, 'restricthtml'));
143
+				$object->multilangs[$key]["label"] = GETPOST("libelle-".$key);
144
+				$object->multilangs[$key]["description"] = dol_htmlcleanlastbr(GETPOST("desc-".$key, 'restricthtml'));
145
+				$object->multilangs[$key]["other"] = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml'));
146 146
 			}
147 147
 		}
148 148
 
@@ -235,9 +235,9 @@  discard block
 block discarded – undo
235 235
 if (empty($reshook)) {
236 236
 	if ($action == '') {
237 237
 		if ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer')) {
238
-			print '<a class="butAction" href="' . DOL_URL_ROOT . '/product/traduction.php?action=add&token='.newToken().'&id=' . $object->id . '">' . $langs->trans("Add") . '</a>';
238
+			print '<a class="butAction" href="'.DOL_URL_ROOT.'/product/traduction.php?action=add&token='.newToken().'&id='.$object->id.'">'.$langs->trans("Add").'</a>';
239 239
 			if ($cnt_trans > 0) {
240
-				print '<a class="butAction" href="' . DOL_URL_ROOT . '/product/traduction.php?action=edit&token='.newToken().'&id=' . $object->id . '">' . $langs->trans("Modify") . '</a>';
240
+				print '<a class="butAction" href="'.DOL_URL_ROOT.'/product/traduction.php?action=edit&token='.newToken().'&id='.$object->id.'">'.$langs->trans("Modify").'</a>';
241 241
 			}
242 242
 		}
243 243
 	}
Please login to merge, or discard this patch.
htdocs/product/dynamic_price/class/price_parser.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@
 block discarded – undo
155 155
 		));
156 156
 
157 157
 		// Retrieve all extrafields if not already not know (should not happen)
158
-		if (! is_object($extrafields)) {
158
+		if (!is_object($extrafields)) {
159 159
 			$extrafields = new ExtraFields($this->db);
160 160
 			$extrafields->fetch_name_optionals_label($product->table_element);
161 161
 		}
Please login to merge, or discard this patch.
htdocs/product/stats/facture_fournisseur.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -246,7 +246,7 @@
 block discarded – undo
246 246
 						$supplierinvoicestatic->id = $objp->facid;
247 247
 						$supplierinvoicestatic->ref = $objp->ref;
248 248
 						$supplierinvoicestatic->ref_supplier = $objp->ref_supplier;
249
-						$supplierinvoicestatic->libelle = $objp->label;	// deprecated
249
+						$supplierinvoicestatic->libelle = $objp->label; // deprecated
250 250
 						$supplierinvoicestatic->label = $objp->label;
251 251
 						$supplierinvoicestatic->total_ht = $objp->total_ht;
252 252
 						$supplierinvoicestatic->total_ttc = $objp->total_ttc;
Please login to merge, or discard this patch.
htdocs/product/admin/product_lot.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
 	$filefound = 0;
114 114
 	$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
115 115
 	foreach ($dirmodels as $reldir) {
116
-		$file = dol_buildpath($reldir . "core/modules/product_batch/doc/pdf_" . $modele . ".modules.php", 0);
116
+		$file = dol_buildpath($reldir."core/modules/product_batch/doc/pdf_".$modele.".modules.php", 0);
117 117
 		if (file_exists($file)) {
118 118
 			$filefound = 1;
119
-			$classname = "pdf_" . $modele;
119
+			$classname = "pdf_".$modele;
120 120
 			break;
121 121
 		}
122 122
 	}
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 		$module = new $classname($db);
128 128
 
129 129
 		if ($module->write_file($product_batch, $langs) > 0) {
130
-			header("Location: " . DOL_URL_ROOT . "/document.php?modulepart=product_batch&file=SPECIMEN.pdf");
130
+			header("Location: ".DOL_URL_ROOT."/document.php?modulepart=product_batch&file=SPECIMEN.pdf");
131 131
 			return;
132 132
 		} else {
133 133
 			setEventMessages($module->error, $module->errors, 'errors');
@@ -364,9 +364,9 @@  discard block
 block discarded – undo
364 364
 // Module to build doc
365 365
 $def = array();
366 366
 $sql = "SELECT nom";
367
-$sql .= " FROM " . MAIN_DB_PREFIX . "document_model";
368
-$sql .= " WHERE type = '" . $db->escape($type) . "'";
369
-$sql .= " AND entity = " . $conf->entity;
367
+$sql .= " FROM ".MAIN_DB_PREFIX."document_model";
368
+$sql .= " WHERE type = '".$db->escape($type)."'";
369
+$sql .= " AND entity = ".$conf->entity;
370 370
 $resql = $db->query($sql);
371 371
 if ($resql) {
372 372
 	$i = 0;
@@ -387,19 +387,19 @@  discard block
 block discarded – undo
387 387
 print '<div class="div-table-responsive-no-min">';
388 388
 print '<table class="noborder centpercent">';
389 389
 print '<tr class="liste_titre">';
390
-print '<td>' . $langs->trans("Name") . '</td>';
391
-print '<td>' . $langs->trans("Description") . '</td>';
392
-print '<td class="center" width="60">' . $langs->trans("Status") . "</td>\n";
393
-print '<td class="center" width="60">' . $langs->trans("Default") . "</td>\n";
390
+print '<td>'.$langs->trans("Name").'</td>';
391
+print '<td>'.$langs->trans("Description").'</td>';
392
+print '<td class="center" width="60">'.$langs->trans("Status")."</td>\n";
393
+print '<td class="center" width="60">'.$langs->trans("Default")."</td>\n";
394 394
 print '<td class="center"></td>';
395
-print '<td class="center" width="80">' . $langs->trans("Preview") . '</td>';
395
+print '<td class="center" width="80">'.$langs->trans("Preview").'</td>';
396 396
 print "</tr>\n";
397 397
 
398 398
 clearstatcache();
399 399
 
400 400
 foreach ($dirmodels as $reldir) {
401 401
 	foreach (array('', '/doc') as $valdir) {
402
-		$dir = dol_buildpath($reldir . "core/modules/product_batch" . $valdir);
402
+		$dir = dol_buildpath($reldir."core/modules/product_batch".$valdir);
403 403
 		if (is_dir($dir)) {
404 404
 			$handle = opendir($dir);
405 405
 			if (is_resource($handle)) {
@@ -411,11 +411,11 @@  discard block
 block discarded – undo
411 411
 
412 412
 				foreach ($filelist as $file) {
413 413
 					if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
414
-						if (file_exists($dir . '/' . $file)) {
414
+						if (file_exists($dir.'/'.$file)) {
415 415
 							$name = substr($file, 4, dol_strlen($file) - 16);
416 416
 							$classname = substr($file, 0, dol_strlen($file) - 12);
417 417
 
418
-							require_once $dir . '/' . $file;
418
+							require_once $dir.'/'.$file;
419 419
 							$module = new $classname($db);
420 420
 
421 421
 							$modulequalified = 1;
@@ -439,14 +439,14 @@  discard block
 block discarded – undo
439 439
 
440 440
 								// Active
441 441
 								if (in_array($name, $def)) {
442
-									print '<td class="center">' . "\n";
443
-									print '<a href="' . $_SERVER["PHP_SELF"] . '?action=del&token=' . newToken() . '&value=' . urlencode($name) . '">';
442
+									print '<td class="center">'."\n";
443
+									print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
444 444
 									print img_picto($langs->trans("Enabled"), 'switch_on');
445 445
 									print '</a>';
446 446
 									print '</td>';
447 447
 								} else {
448
-									print '<td class="center">' . "\n";
449
-									print '<a href="' . $_SERVER["PHP_SELF"] . '?action=set&token=' . newToken() . '&value=' . urlencode($name) . '&scan_dir=' . urlencode($module->scandir) . '&label=' . urlencode($module->name) . '">' . img_picto($langs->trans("Disabled"), 'switch_off') . '</a>';
448
+									print '<td class="center">'."\n";
449
+									print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
450 450
 									print "</td>";
451 451
 								}
452 452
 
@@ -455,19 +455,19 @@  discard block
 block discarded – undo
455 455
 								if (getDolGlobalString('PRODUCT_BATCH_ADDON_PDF') == $name) {
456 456
 									print img_picto($langs->trans("Default"), 'on');
457 457
 								} else {
458
-									print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setdoc&token=' . newToken() . '&value=' . urlencode($name) . '&scan_dir=' . urlencode($module->scandir) . '&label=' . urlencode($module->name) . '" alt="' . $langs->trans("Default") . '">' . img_picto($langs->trans("Disabled"), 'off') . '</a>';
458
+									print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
459 459
 								}
460 460
 								print '</td>';
461 461
 
462 462
 								// Info
463
-								$htmltooltip = '' . $langs->trans("Name") . ': ' . $module->name;
464
-								$htmltooltip .= '<br>' . $langs->trans("Type") . ': ' . ($module->type ? $module->type : $langs->trans("Unknown"));
463
+								$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
464
+								$htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
465 465
 								if ($module->type == 'pdf') {
466
-									$htmltooltip .= '<br>' . $langs->trans("Width") . '/' . $langs->trans("Height") . ': ' . $module->page_largeur . '/' . $module->page_hauteur;
466
+									$htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
467 467
 								}
468
-								$htmltooltip .= '<br><br><u>' . $langs->trans("FeaturesSupported") . ':</u>';
469
-								$htmltooltip .= '<br>' . $langs->trans("Logo") . ': ' . yn($module->option_logo, 1, 1);
470
-								$htmltooltip .= '<br>' . $langs->trans("MultiLanguage") . ': ' . yn($module->option_multilang, 1, 1);
468
+								$htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
469
+								$htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
470
+								$htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
471 471
 
472 472
 
473 473
 								print '<td class="center">';
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
 								// Preview
478 478
 								print '<td class="center">';
479 479
 								if ($module->type == 'pdf') {
480
-									print '<a href="' . $_SERVER["PHP_SELF"] . '?action=specimen&module=' . $name . '">' . img_object($langs->trans("Preview"), 'contract') . '</a>';
480
+									print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'contract').'</a>';
481 481
 								} else {
482 482
 									print img_object($langs->trans("PreviewNotAvailable"), 'generic');
483 483
 								}
Please login to merge, or discard this patch.
htdocs/product/stock/stocktransfer/stocktransfer_contact.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
 	$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
132 132
 	// Thirdparty
133 133
 	if (!empty($object->thirdparty)) {
134
-		$morehtmlref .= '<br>' . $langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1, 'customer');
134
+		$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'customer');
135 135
 	}
136 136
 	// Project
137 137
 	if (isModEnabled('project')) {
Please login to merge, or discard this patch.
htdocs/product/stock/stockatdate.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 	if ($productid > 0) {
155 155
 		$sql .= " AND ps.fk_product = ".((int) $productid);
156 156
 	}
157
-	if (! empty($search_fk_warehouse)) {
157
+	if (!empty($search_fk_warehouse)) {
158 158
 		$sql .= " AND ps.fk_entrepot IN (".$db->sanitize(join(",", $search_fk_warehouse)).")";
159 159
 	}
160 160
 	if ($search_ref) {
@@ -562,9 +562,9 @@  discard block
 block discarded – undo
562 562
 
563 563
 		if ($mode == 'future') {
564 564
 			$prod->load_stock('warehouseopen,warehouseinternal,nobatch', 0, $dateendofday);
565
-			$stock = $prod->stock_theorique;		// virtual stock at a date
565
+			$stock = $prod->stock_theorique; // virtual stock at a date
566 566
 			$prod->load_stock('warehouseopen,warehouseinternal,nobatch', 0);
567
-			$virtualstock = $prod->stock_theorique;	// virtual stock in infinite future
567
+			$virtualstock = $prod->stock_theorique; // virtual stock in infinite future
568 568
 		} else {
569 569
 			$stock = $currentstock;
570 570
 			$nbofmovement = 0;
Please login to merge, or discard this patch.
htdocs/product/stock/stats/reception.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@
 block discarded – undo
39 39
 
40 40
 $id = GETPOST('id', 'int');
41 41
 $ref = GETPOST('ref', 'alpha');
42
-$batch  	= GETPOST('batch', 'alpha');
43
-$objectid  = GETPOST('productid', 'int');
42
+$batch = GETPOST('batch', 'alpha');
43
+$objectid = GETPOST('productid', 'int');
44 44
 
45 45
 // Security check
46 46
 $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : ''));
Please login to merge, or discard this patch.
htdocs/product/stock/stats/expedition.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@
 block discarded – undo
39 39
 
40 40
 $id = GETPOST('id', 'int');
41 41
 $ref = GETPOST('ref', 'alpha');
42
-$batch  	= GETPOST('batch', 'alpha');
43
-$objectid  = GETPOST('productid', 'int');
42
+$batch = GETPOST('batch', 'alpha');
43
+$objectid = GETPOST('productid', 'int');
44 44
 
45 45
 // Security check
46 46
 $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : ''));
Please login to merge, or discard this patch.
htdocs/install/repair.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1155,7 +1155,7 @@  discard block
 block discarded – undo
1155 1155
 									$result = 'found'; // If error, we force like if we found to avoid any deletion
1156 1156
 								}
1157 1157
 							} else {
1158
-								$result = 'found';	//
1158
+								$result = 'found'; //
1159 1159
 							}
1160 1160
 
1161 1161
 							if (!$result) {
@@ -1525,16 +1525,16 @@  discard block
 block discarded – undo
1525 1525
 
1526 1526
 // Repair llx_commande_fournisseur to eleminate duplicate reference
1527 1527
 if ($ok && GETPOST('repair_supplier_order_duplicate_ref')) {
1528
-	require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.commande.class.php';
1529
-	include_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
1528
+	require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
1529
+	include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
1530 1530
 
1531 1531
 	$db->begin();
1532 1532
 
1533 1533
 	$err = 0;
1534 1534
 
1535 1535
 	// Query to find all duplicate supplier orders
1536
-	$sql = "SELECT * FROM " . MAIN_DB_PREFIX . "commande_fournisseur";
1537
-	$sql .= " WHERE ref IN (SELECT cf.ref FROM " . MAIN_DB_PREFIX . "commande_fournisseur cf GROUP BY cf.ref, cf.entity HAVING COUNT(cf.rowid) > 1)";
1536
+	$sql = "SELECT * FROM ".MAIN_DB_PREFIX."commande_fournisseur";
1537
+	$sql .= " WHERE ref IN (SELECT cf.ref FROM ".MAIN_DB_PREFIX."commande_fournisseur cf GROUP BY cf.ref, cf.entity HAVING COUNT(cf.rowid) > 1)";
1538 1538
 
1539 1539
 	// Build a list of ref => []CommandeFournisseur
1540 1540
 	$duplicateSupplierOrders = [];
@@ -1560,7 +1560,7 @@  discard block
 block discarded – undo
1560 1560
 
1561 1561
 			$newRef = $supplierOrder->getNextNumRef($soc);
1562 1562
 
1563
-			$sql = "UPDATE " . MAIN_DB_PREFIX . "commande_fournisseur cf SET cf.ref = '" . $db->escape($newRef) . "' WHERE cf.rowid = " . (int) $supplierOrder->id;
1563
+			$sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur cf SET cf.ref = '".$db->escape($newRef)."' WHERE cf.rowid = ".(int) $supplierOrder->id;
1564 1564
 			if (!$db->query($sql)) {
1565 1565
 				$err++;
1566 1566
 			}
Please login to merge, or discard this patch.