Completed
Branch develop (cec3a6)
by
unknown
19:26
created
htdocs/debugbar/class/DebugBar.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,10 +75,10 @@
 block discarded – undo
75 75
 	public function getRenderer()
76 76
 	{
77 77
 		$renderer = parent::getJavascriptRenderer(DOL_URL_ROOT.'/includes/maximebf/debugbar/src/DebugBar/Resources');
78
-		$renderer->disableVendor('jquery');			// We already have jquery loaded globally by the main.inc.php
79
-		$renderer->disableVendor('fontawesome');	// We already have fontawesome loaded globally by the main.inc.php
80
-		$renderer->disableVendor('highlightjs');	// We don't need this
81
-		$renderer->setEnableJqueryNoConflict(false);	// We don't need no conflict
78
+		$renderer->disableVendor('jquery'); // We already have jquery loaded globally by the main.inc.php
79
+		$renderer->disableVendor('fontawesome'); // We already have fontawesome loaded globally by the main.inc.php
80
+		$renderer->disableVendor('highlightjs'); // We don't need this
81
+		$renderer->setEnableJqueryNoConflict(false); // We don't need no conflict
82 82
 
83 83
 		return $renderer;
84 84
 	}
Please login to merge, or discard this patch.
htdocs/contact/document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
 }
95 95
 $result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', 0); // If we create a contact with no company (shared contacts), no check on write permission
96 96
 
97
-$permissiontoadd = $user->hasRight('societe', 'contact', 'creer');	// Used by the include of actions_dellink.inc.php
97
+$permissiontoadd = $user->hasRight('societe', 'contact', 'creer'); // Used by the include of actions_dellink.inc.php
98 98
 
99 99
 
100 100
 /*
Please login to merge, or discard this patch.
htdocs/contact/perso.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@
 block discarded – undo
197 197
 		$maxfilesizearray = getMaxFileSizeArray();
198 198
 		$maxmin = $maxfilesizearray['maxmin'];
199 199
 		if ($maxmin > 0) {
200
-			print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
200
+			print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
201 201
 		}
202 202
 		print '<input type="file" class="flat" name="photo" id="photoinput">';
203 203
 		print '</td></tr>';
Please login to merge, or discard this patch.
htdocs/product/inventory/class/inventory.class.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
 	 */
62 62
 	public $picto = 'inventory';
63 63
 
64
-	const STATUS_DRAFT     = 0;		// Draft
65
-	const STATUS_VALIDATED = 1;		// Inventory is in process
66
-	const STATUS_RECORDED  = 2;		// Inventory is finisged. Stock movement has been recorded.
67
-	const STATUS_CANCELED  = 9;		// Canceled
64
+	const STATUS_DRAFT     = 0; // Draft
65
+	const STATUS_VALIDATED = 1; // Inventory is in process
66
+	const STATUS_RECORDED  = 2; // Inventory is finisged. Stock movement has been recorded.
67
+	const STATUS_CANCELED  = 9; // Canceled
68 68
 
69 69
 	/**
70 70
 	 *  'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter]]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 		'fk_warehouse'       => array('type'=>'integer:Entrepot:product/stock/class/entrepot.class.php', 'label'=>'Warehouse', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'index'=>1, 'help'=>'InventoryForASpecificWarehouse', 'picto'=>'stock', 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx', 'csslist'=>'tdoverflowmax150'),
105 105
 		'fk_product'         => array('type'=>'integer:Product:product/class/product.class.php', 'label'=>'Product', 'get_name_url_params' => '0::0:-1:0::1', 'visible'=>1, 'enabled'=>1, 'position'=>32, 'index'=>1, 'help'=>'InventoryForASpecificProduct', 'picto'=>'product', 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx', 'csslist'=>'tdoverflowmax150'),
106 106
 		'categories_product' => array('type'=>'chkbxlst:categorie:label:rowid::type=0:0:', 'label'=>'OrProductsWithCategories', 'visible'=>3, 'enabled'=>1, 'position'=>33, 'help'=>'', 'picto'=>'category', 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx'),
107
-		'date_inventory'     => array('type'=>'date', 'label'=>'DateValue', 'visible'=>1, 'enabled'=>'$conf->global->STOCK_INVENTORY_ADD_A_VALUE_DATE', 'position'=>35, 'csslist'=>'nowraponall'),	// This date is not used so disabled by default.
107
+		'date_inventory'     => array('type'=>'date', 'label'=>'DateValue', 'visible'=>1, 'enabled'=>'$conf->global->STOCK_INVENTORY_ADD_A_VALUE_DATE', 'position'=>35, 'csslist'=>'nowraponall'), // This date is not used so disabled by default.
108 108
 		'date_creation'      => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>500, 'csslist'=>'nowraponall'),
109 109
 		'tms'                => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>501, 'csslist'=>'nowraponall'),
110 110
 		'date_validation'    => array('type'=>'datetime', 'label'=>'DateValidation', 'visible'=>-2, 'enabled'=>1, 'position'=>502, 'csslist'=>'nowraponall'),
@@ -763,10 +763,10 @@  discard block
 block discarded – undo
763 763
 	public function getChildWarehouse($id, &$TChildWarehouse)
764 764
 	{
765 765
 		$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'entrepot';
766
-		$sql.= ' WHERE fk_parent='.(int) $id;
767
-		$sql.= ' ORDER BY rowid';
766
+		$sql .= ' WHERE fk_parent='.(int) $id;
767
+		$sql .= ' ORDER BY rowid';
768 768
 		$resql = $this->db->query($sql);
769
-		if ($resql && $this->db->num_rows($resql)>0) {
769
+		if ($resql && $this->db->num_rows($resql) > 0) {
770 770
 			while ($obj = $this->db->fetch_object($resql)) {
771 771
 				$TChildWarehouse[] = $obj->rowid;
772 772
 				$this->getChildWarehouse($obj->rowid, $TChildWarehouse);
Please login to merge, or discard this patch.
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.
doctemplates/websites/website_template-noimg/containers/manifest.json.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php // BEGIN PHP
2
-$websitekey=basename(__DIR__);
3
-if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_once __DIR__.'/master.inc.php'; } // Load env if not already loaded
2
+$websitekey = basename(__DIR__);
3
+if (!defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) { require_once __DIR__.'/master.inc.php'; } // Load env if not already loaded
4 4
 require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';
5 5
 require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';
6 6
 ob_start();
Please login to merge, or discard this patch.