Completed
Branch develop (aa6d31)
by
unknown
24:05
created
htdocs/core/lib/company.lib.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 				$nbContact = $obj->nb;
84 84
 			}
85 85
 
86
-			dol_setcache($cachekey, $nbContact, 120);	// If setting cache fails, this is not a problem, so we do not test result.
86
+			dol_setcache($cachekey, $nbContact, 120); // If setting cache fails, this is not a problem, so we do not test result.
87 87
 		}
88 88
 
89 89
 		$head[$h][0] = DOL_URL_ROOT.'/societe/contact.php?socid='.$object->id;
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 			} else {
182 182
 				dol_print_error($db);
183 183
 			}
184
-			dol_setcache($cachekey, $nbProject, 120);	// If setting cache fails, this is not a problem, so we do not test result.
184
+			dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result.
185 185
 		}
186 186
 		$head[$h][0] = DOL_URL_ROOT.'/societe/project.php?socid='.$object->id;
187 187
 		$head[$h][1] = $langs->trans("Projects");
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 			} else {
346 346
 				dol_print_error($db);
347 347
 			}
348
-			dol_setcache($cachekey, $nbTicket, 120);		// If setting cache fails, this is not a problem, so we do not test result.
348
+			dol_setcache($cachekey, $nbTicket, 120); // If setting cache fails, this is not a problem, so we do not test result.
349 349
 		}
350 350
 
351 351
 		$head[$h][0] = DOL_URL_ROOT.'/ticket/list.php?socid='.urlencode((string) ($object->id));
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
 				} else {
392 392
 					dol_print_error($db);
393 393
 				}
394
-				dol_setcache($cachekey, $nbNotif, 120);		// If setting cache fails, this is not a problem, so we do not test result.
394
+				dol_setcache($cachekey, $nbNotif, 120); // If setting cache fails, this is not a problem, so we do not test result.
395 395
 			}
396 396
 
397 397
 			$head[$h][0] = DOL_URL_ROOT.'/societe/notify/card.php?socid='.urlencode((string) ($object->id));
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
 			$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
435 435
 			$nbLinks = Link::count($db, $object->element, $object->id);
436 436
 			$totalAttached = $nbFiles + $nbLinks;
437
-			dol_setcache($cachekey, $totalAttached, 120);		// If setting cache fails, this is not a problem, so we do not test result.
437
+			dol_setcache($cachekey, $totalAttached, 120); // If setting cache fails, this is not a problem, so we do not test result.
438 438
 		}
439 439
 
440 440
 		$head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id;
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
 			} else {
469 469
 				dol_syslog('Failed to count actioncomm '.$db->lasterror(), LOG_ERR);
470 470
 			}
471
-			dol_setcache($cachekey, $nbEvent, 120);		// If setting cache fails, this is not a problem, so we do not test result.
471
+			dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result.
472 472
 		}
473 473
 
474 474
 		$head[$h][1] .= '/';
@@ -869,7 +869,7 @@  discard block
 block discarded – undo
869 869
 		return false;
870 870
 	}
871 871
 
872
-	$country_code_in_EEC = getCountriesInEEC();		// This make a database call but there is a cache done into $conf->cache['country_code_in_EEC']
872
+	$country_code_in_EEC = getCountriesInEEC(); // This make a database call but there is a cache done into $conf->cache['country_code_in_EEC']
873 873
 
874 874
 	//print "dd".$object->country_code;
875 875
 	return in_array($object->country_code, $country_code_in_EEC);
@@ -924,7 +924,7 @@  discard block
 block discarded – undo
924 924
 		return false;
925 925
 	}
926 926
 
927
-	$country_code_in_SEPA = getCountriesInSEPA();		// This make a database call but there is a cache done into $conf->cache['country_code_in_SEPA']
927
+	$country_code_in_SEPA = getCountriesInSEPA(); // This make a database call but there is a cache done into $conf->cache['country_code_in_SEPA']
928 928
 
929 929
 	//print "dd".$object->country_code;
930 930
 	return in_array($object->country_code, $country_code_in_SEPA);
@@ -1369,7 +1369,7 @@  discard block
 block discarded – undo
1369 1369
 	$mode = 'view';
1370 1370
 
1371 1371
 	$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
1372
-	$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
1372
+	$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
1373 1373
 	$selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
1374 1374
 	$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
1375 1375
 
@@ -1419,7 +1419,7 @@  discard block
 block discarded – undo
1419 1419
 	$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as t";
1420 1420
 	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople_extrafields as ef on (t.rowid = ef.fk_object)";
1421 1421
 	$sql .= " WHERE t.fk_soc = ".((int) $object->id);
1422
-	$sql .= " AND t.entity IN (" .getEntity('socpeople') .")";
1422
+	$sql .= " AND t.entity IN (".getEntity('socpeople').")";
1423 1423
 	$sql .= " AND ((t.fk_user_creat = ".((int) $user->id)." AND t.priv = 1) OR t.priv = 0)";
1424 1424
 	if ($search_rowid) {
1425 1425
 		$sql .= natural_search('t.rowid', $search_rowid);
@@ -1848,7 +1848,7 @@  discard block
 block discarded – undo
1848 1848
 		$tms_start = '';
1849 1849
 		$tms_end = '';
1850 1850
 	}
1851
-	require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php';
1851
+	require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
1852 1852
 
1853 1853
 	// Check parameters
1854 1854
 	if (!is_object($filterobj) && !is_object($objcon)) {
@@ -1912,7 +1912,7 @@  discard block
 block discarded – undo
1912 1912
 
1913 1913
 		// Fields from hook
1914 1914
 		$parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon);
1915
-		$reshook = $hookmanager->executeHooks('showActionsDoneListSelect', $parameters);    // Note that $action and $object may have been modified by hook
1915
+		$reshook = $hookmanager->executeHooks('showActionsDoneListSelect', $parameters); // Note that $action and $object may have been modified by hook
1916 1916
 		if (!empty($hookmanager->resPrint)) {
1917 1917
 			$sql .= $hookmanager->resPrint;
1918 1918
 		}
@@ -1936,7 +1936,7 @@  discard block
 block discarded – undo
1936 1936
 
1937 1937
 		// Fields from hook
1938 1938
 		$parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon);
1939
-		$reshook = $hookmanager->executeHooks('showActionsDoneListFrom', $parameters);    // Note that $action and $object may have been modified by hook
1939
+		$reshook = $hookmanager->executeHooks('showActionsDoneListFrom', $parameters); // Note that $action and $object may have been modified by hook
1940 1940
 		if (!empty($hookmanager->resPrint)) {
1941 1941
 			$sql .= $hookmanager->resPrint;
1942 1942
 		}
@@ -2033,7 +2033,7 @@  discard block
 block discarded – undo
2033 2033
 			}
2034 2034
 		} else {
2035 2035
 			if (is_object($filterobj) && $filterobj->id > 0 && get_class($filterobj) == 'User') {
2036
-				$sql .= " AND (u.rowid = ". ((int) $filterobj->id).' OR ';
2036
+				$sql .= " AND (u.rowid = ".((int) $filterobj->id).' OR ';
2037 2037
 				$sql .= " EXISTS (SELECT r.rowid FROM ".MAIN_DB_PREFIX."actioncomm_resources as r WHERE a.id = r.fk_actioncomm";
2038 2038
 				$sql .= " AND r.element_type = '".$db->escape($filterobj->table_element)."' AND r.fk_element = ".((int) $filterobj->id).')';
2039 2039
 				$sql .= ")";
@@ -2079,7 +2079,7 @@  discard block
 block discarded – undo
2079 2079
 
2080 2080
 		// Fields from hook
2081 2081
 		$parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon, 'module' => $module);
2082
-		$reshook = $hookmanager->executeHooks('showActionsDoneListWhere', $parameters);    // Note that $action and $object may have been modified by hook
2082
+		$reshook = $hookmanager->executeHooks('showActionsDoneListWhere', $parameters); // Note that $action and $object may have been modified by hook
2083 2083
 		if (!empty($hookmanager->resPrint)) {
2084 2084
 			$sql .= $hookmanager->resPrint;
2085 2085
 		}
@@ -2806,7 +2806,7 @@  discard block
 block discarded – undo
2806 2806
 	// Add an optional image under the ban with logo/title
2807 2807
 	if (getDolGlobalString($subimageconst)) {
2808 2808
 		print '<div class="backimagepublicsubimage">';
2809
-		print '<img id="id'.$subimageconst.'" src="' . getDolGlobalString($subimageconst).'">';
2809
+		print '<img id="id'.$subimageconst.'" src="'.getDolGlobalString($subimageconst).'">';
2810 2810
 		print '</div>';
2811 2811
 	}
2812 2812
 
@@ -2891,14 +2891,14 @@  discard block
 block discarded – undo
2891 2891
 		$parammessageform = 'ONLINE_PAYMENT_MESSAGE_FORM_'.$suffix;
2892 2892
 		if (getDolGlobalString($parammessageform) !== '') {
2893 2893
 			print $langs->transnoentities(getDolGlobalString($parammessageform));
2894
-		} elseif (getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORM')  !== '') {
2894
+		} elseif (getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORM') !== '') {
2895 2895
 			print $langs->transnoentities(getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORM'));
2896 2896
 		}
2897 2897
 
2898 2898
 		// Add other message if VAT exists
2899 2899
 		if (!empty($object->total_vat) || !empty($object->total_tva)) {
2900 2900
 			$parammessageform = 'ONLINE_PAYMENT_MESSAGE_FORMIFVAT_'.$suffix;
2901
-			if (getDolGlobalString($parammessageform)  !== '') {
2901
+			if (getDolGlobalString($parammessageform) !== '') {
2902 2902
 				print $langs->transnoentities(getDolGlobalString($parammessageform));
2903 2903
 			} elseif (getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORMIFVAT') !== '') {
2904 2904
 				print $langs->transnoentities(getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORMIFVAT'));
Please login to merge, or discard this patch.
htdocs/core/class/menubase.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -742,8 +742,8 @@
 block discarded – undo
742 742
 					$tabMenu[$b]['type']        = $menu['type'];
743 743
 					$tabMenu[$b]['fk_mainmenu'] = $menu['fk_mainmenu'];
744 744
 					$tabMenu[$b]['fk_leftmenu'] = $menu['fk_leftmenu'];
745
-					$tabMenu[$b]['position']    		= (int) $menu['position'];
746
-					$tabMenu[$b]['showtopmenuinframe']	= (int) $menu['showtopmenuinframe'];
745
+					$tabMenu[$b]['position'] = (int) $menu['position'];
746
+					$tabMenu[$b]['showtopmenuinframe'] = (int) $menu['showtopmenuinframe'];
747 747
 
748 748
 					$b++;
749 749
 				}
Please login to merge, or discard this patch.
htdocs/core/class/extrafields.class.php 1 patch
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -1190,7 +1190,7 @@  discard block
 block discarded – undo
1190 1190
 					'start' => isset($value['start']) ? $value['start'] : '',
1191 1191
 					'end'   => isset($value['end']) ? $value['end'] : ''
1192 1192
 				);
1193
-				$out = '<div ' . ($moreparam ? $moreparam : '') . '><div class="nowrap">';
1193
+				$out = '<div '.($moreparam ? $moreparam : '').'><div class="nowrap">';
1194 1194
 				$out .= $form->selectDate($prefill['start'], $keyprefix.$key.$keysuffix.'_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From"));
1195 1195
 				$out .= '</div><div class="nowrap">';
1196 1196
 				$out .= $form->selectDate($prefill['end'], $keyprefix.$key.$keysuffix.'_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to"));
@@ -1215,7 +1215,7 @@  discard block
 block discarded – undo
1215 1215
 					'start' => isset($value['start']) ? $value['start'] : '',
1216 1216
 					'end'   => isset($value['end']) ? $value['end'] : ''
1217 1217
 				);
1218
-				$out = '<div ' . ($moreparam ? $moreparam : '') . '><div class="nowrap">';
1218
+				$out = '<div '.($moreparam ? $moreparam : '').'><div class="nowrap">';
1219 1219
 				$out .= $form->selectDate($prefill['start'], $keyprefix.$key.$keysuffix.'_start', 1, 1, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From"), 'tzuserrel');
1220 1220
 				$out .= '</div><div class="nowrap">';
1221 1221
 				$out .= $form->selectDate($prefill['end'], $keyprefix.$key.$keysuffix.'_end', 1, 1, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to"), 'tzuserrel');
@@ -1285,7 +1285,7 @@  discard block
 block discarded – undo
1285 1285
 			} else {
1286 1286
 				$out = $form->selectyesno($keyprefix.$key.$keysuffix, $value, 1, false, 1, 1, 'width75 yesno');
1287 1287
 			}
1288
-			$out .= '<input type="hidden" name="'.$keyprefix.$key.$keysuffix.'_boolean" value="1">';	// A hidden field ending with "_boolean" that is always set to 1.
1288
+			$out .= '<input type="hidden" name="'.$keyprefix.$key.$keysuffix.'_boolean" value="1">'; // A hidden field ending with "_boolean" that is always set to 1.
1289 1289
 		} elseif ($type == 'price') {
1290 1290
 			if (!empty($value)) {		// $value in memory is a php numeric, we format it into user number format.
1291 1291
 				$value = price($value);
@@ -1303,7 +1303,7 @@  discard block
 block discarded – undo
1303 1303
 			$out .= $form->selectCurrency($currency, $keyprefix.$key.$keysuffix.'currency_id');
1304 1304
 		} elseif ($type == 'duration') {
1305 1305
 			$value = intval($value);
1306
-			$out = $form->select_duration($keyprefix . $key, $value, 0, 'text', 0, 1);
1306
+			$out = $form->select_duration($keyprefix.$key, $value, 0, 'text', 0, 1);
1307 1307
 		} elseif ($type == 'double') {
1308 1308
 			if (!empty($value)) {		// $value in memory is a php numeric, we format it into user number format.
1309 1309
 				$value = price($value);
@@ -1420,8 +1420,8 @@  discard block
 block discarded – undo
1420 1420
 					// 7 : sort field (not used here but used into format for commobject)
1421 1421
 
1422 1422
 					// If there is a filter, we extract it by taking all content inside parenthesis.
1423
-					if (! empty($InfoFieldList[4])) {
1424
-						$pos = 0;	// $pos will be position of ending filter
1423
+					if (!empty($InfoFieldList[4])) {
1424
+						$pos = 0; // $pos will be position of ending filter
1425 1425
 						$parenthesisopen = 0;
1426 1426
 						while (substr($InfoFieldList[4], $pos, 1) !== '' && ($parenthesisopen || $pos == 0 || substr($InfoFieldList[4], $pos, 1) != ':')) {
1427 1427
 							if (substr($InfoFieldList[4], $pos, 1) == '(') {
@@ -1523,7 +1523,7 @@  discard block
 block discarded – undo
1523 1523
 							// can use filter on any field of object
1524 1524
 							if (is_object($object)) {
1525 1525
 								$tags = [];
1526
-								preg_match_all('/\$(.*?)\$/', $InfoFieldList[4], $tags);	// Example: $InfoFieldList[4] is ($dateadh$:<=:CURRENT_DATE)
1526
+								preg_match_all('/\$(.*?)\$/', $InfoFieldList[4], $tags); // Example: $InfoFieldList[4] is ($dateadh$:<=:CURRENT_DATE)
1527 1527
 								foreach ($tags[0] as $keytag => $valuetag) {
1528 1528
 									$property = preg_replace('/[^a-z0-9_]/', '', strtolower($tags[1][$keytag]));
1529 1529
 									if (strpos($InfoFieldList[4], $valuetag) !== false && property_exists($object, $property) && !empty($object->$property)) {
@@ -1539,9 +1539,9 @@  discard block
 block discarded – undo
1539 1539
 							if (strpos($InfoFieldList[4], 'extra.') !== false) {
1540 1540
 								$sql .= ' as main, '.$this->db->sanitize($this->db->prefix().$InfoFieldList[0]).'_extrafields as extra';
1541 1541
 								$sqlwhere .= " WHERE extra.fk_object = main.".$this->db->sanitize($InfoFieldList[2]);
1542
-								$sqlwhere .= " AND " . forgeSQLFromUniversalSearchCriteria($InfoFieldList[4], $errstr, 1);
1542
+								$sqlwhere .= " AND ".forgeSQLFromUniversalSearchCriteria($InfoFieldList[4], $errstr, 1);
1543 1543
 							} else {
1544
-								$sqlwhere .= " WHERE " . forgeSQLFromUniversalSearchCriteria($InfoFieldList[4], $errstr, 1);
1544
+								$sqlwhere .= " WHERE ".forgeSQLFromUniversalSearchCriteria($InfoFieldList[4], $errstr, 1);
1545 1545
 							}
1546 1546
 						} else {
1547 1547
 							$sqlwhere .= ' WHERE 1=1';
@@ -1567,7 +1567,7 @@  discard block
 block discarded – undo
1567 1567
 						$sql .= $sqlwhere;
1568 1568
 
1569 1569
 						$sql .= $this->db->order(implode(', ', $fields_label));
1570
-						$sql .= ' LIMIT ' . getDolGlobalInt('MAIN_EXTRAFIELDS_LIMIT_SELLIST_SQL', 1000);
1570
+						$sql .= ' LIMIT '.getDolGlobalInt('MAIN_EXTRAFIELDS_LIMIT_SELLIST_SQL', 1000);
1571 1571
 						//print $sql;
1572 1572
 
1573 1573
 						dol_syslog(get_class($this).'::showInputField type=sellist', LOG_DEBUG);
@@ -1682,7 +1682,7 @@  discard block
 block discarded – undo
1682 1682
 				// 7 : sort field (not used here but used into format for commobject)
1683 1683
 
1684 1684
 				// If there is a filter, we extract it by taking all content inside parenthesis.
1685
-				if (! empty($InfoFieldList[4])) {
1685
+				if (!empty($InfoFieldList[4])) {
1686 1686
 					$pos = 0;
1687 1687
 					$parenthesisopen = 0;
1688 1688
 					while (substr($InfoFieldList[4], $pos, 1) !== '' && ($parenthesisopen || $pos == 0 || substr($InfoFieldList[4], $pos, 1) != ':')) {
@@ -1779,9 +1779,9 @@  discard block
 block discarded – undo
1779 1779
 						if (strpos($InfoFieldList[4], 'extra.') !== false) {
1780 1780
 							$sql .= ' as main, '.$this->db->sanitize($this->db->prefix().$InfoFieldList[0]).'_extrafields as extra';
1781 1781
 							$sqlwhere .= " WHERE extra.fk_object = main.".$this->db->sanitize($InfoFieldList[2]);
1782
-							$sqlwhere .= " AND " . forgeSQLFromUniversalSearchCriteria($InfoFieldList[4], $errstr, 1);
1782
+							$sqlwhere .= " AND ".forgeSQLFromUniversalSearchCriteria($InfoFieldList[4], $errstr, 1);
1783 1783
 						} else {
1784
-							$sqlwhere .= " WHERE " . forgeSQLFromUniversalSearchCriteria($InfoFieldList[4], $errstr, 1);
1784
+							$sqlwhere .= " WHERE ".forgeSQLFromUniversalSearchCriteria($InfoFieldList[4], $errstr, 1);
1785 1785
 						}
1786 1786
 					} else {
1787 1787
 						$sqlwhere .= ' WHERE 1=1';
@@ -1900,7 +1900,7 @@  discard block
 block discarded – undo
1900 1900
 
1901 1901
 			$tmparray = explode(':', $param_list[0]);
1902 1902
 
1903
-			$element = $extrafieldsobjectkey;		// $extrafieldsobjectkey comes from $object->table_element but we need $object->element
1903
+			$element = $extrafieldsobjectkey; // $extrafieldsobjectkey comes from $object->table_element but we need $object->element
1904 1904
 			if ($element == 'socpeople') {
1905 1905
 				$element = 'contact';
1906 1906
 			} elseif ($element == 'projet') {
@@ -1908,8 +1908,8 @@  discard block
 block discarded – undo
1908 1908
 			}
1909 1909
 
1910 1910
 			//$objectdesc = $param_list[0];				// Example: 'ObjectName:classPath:1:(status:=:1)'	Replaced by next line: this was propagated also a filter by ajax call that was blocked by some WAF
1911
-			$objectdesc = $tmparray[0];					// Example: 'ObjectName:classPath'					To not propagate any filter (selectForForms do ajax call and propagating SQL filter is blocked by some WAF). Also we should use the one into the definition in the ->fields of $elem if found.
1912
-			$objectfield = $element.':options_'.$key;	// Example: 'actioncomm:options_fff'				To be used in priority to know object linked with all its definition (including filters)
1911
+			$objectdesc = $tmparray[0]; // Example: 'ObjectName:classPath'					To not propagate any filter (selectForForms do ajax call and propagating SQL filter is blocked by some WAF). Also we should use the one into the definition in the ->fields of $elem if found.
1912
+			$objectfield = $element.':options_'.$key; // Example: 'actioncomm:options_fff'				To be used in priority to know object linked with all its definition (including filters)
1913 1913
 
1914 1914
 			$out = $form->selectForForms($objectdesc, $keyprefix.$key.$keysuffix, $value, $showempty, '', '', $morecss, '', 0, 0, '', $objectfield);
1915 1915
 		} elseif (in_array($type, ['point', 'multipts', 'linestrg', 'polygon'])) {
@@ -2020,7 +2020,7 @@  discard block
 block discarded – undo
2020 2020
 
2021 2021
 		$label = $this->attributes[$extrafieldsobjectkey]['label'][$key];
2022 2022
 		$type = $this->attributes[$extrafieldsobjectkey]['type'][$key];
2023
-		$size = $this->attributes[$extrafieldsobjectkey]['size'][$key];			// Can be '255', '24,8'...
2023
+		$size = $this->attributes[$extrafieldsobjectkey]['size'][$key]; // Can be '255', '24,8'...
2024 2024
 		$default = $this->attributes[$extrafieldsobjectkey]['default'][$key];
2025 2025
 		$computed = $this->attributes[$extrafieldsobjectkey]['computed'][$key];
2026 2026
 		$unique = $this->attributes[$extrafieldsobjectkey]['unique'][$key];
@@ -2051,7 +2051,7 @@  discard block
 block discarded – undo
2051 2051
 		if ($type == 'date') {
2052 2052
 			$showsize = 10;
2053 2053
 			if ($value !== '') {
2054
-				$value = dol_print_date($value, 'day');	// For date without hour, date is always GMT for storage and output
2054
+				$value = dol_print_date($value, 'day'); // For date without hour, date is always GMT for storage and output
2055 2055
 			}
2056 2056
 		} elseif ($type == 'datetime') {
2057 2057
 			$showsize = 19;
@@ -2182,9 +2182,9 @@  discard block
 block discarded – undo
2182 2182
 								$translabel = $outputlangs->trans($obj->$field_toshow);
2183 2183
 
2184 2184
 								if ($translabel != $obj->$field_toshow) {
2185
-									$value .= dol_trunc($translabel, 24) . ' ';
2185
+									$value .= dol_trunc($translabel, 24).' ';
2186 2186
 								} else {
2187
-									$value .= $obj->$field_toshow . ' ';
2187
+									$value .= $obj->$field_toshow.' ';
2188 2188
 								}
2189 2189
 							}
2190 2190
 						}
@@ -2205,13 +2205,13 @@  discard block
 block discarded – undo
2205 2205
 					$toprint = array();
2206 2206
 					$obj = $this->db->fetch_object($resql);
2207 2207
 					if ($obj->rowid) {
2208
-						require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
2208
+						require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
2209 2209
 						$c = new Categorie($this->db);
2210 2210
 						$result = $c->fetch($obj->rowid);
2211 2211
 						if ($result > 0) {
2212 2212
 							$ways = $c->print_all_ways(); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text
2213 2213
 							foreach ($ways as $way) {
2214
-								$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ? ' style="background: #' . $c->color . ';"' : ' style="background: #bbb"') . '>' . img_object('', 'category') . ' ' . $way . '</li>';
2214
+								$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"'.($c->color ? ' style="background: #'.$c->color.';"' : ' style="background: #bbb"').'>'.img_object('', 'category').' '.$way.'</li>';
2215 2215
 							}
2216 2216
 						}
2217 2217
 					}
@@ -2353,7 +2353,7 @@  discard block
 block discarded – undo
2353 2353
 						if (get_class($tmpobject) == 'Categorie') {
2354 2354
 							// For category object, rendering must use the same method than the one deinfed into showCategories()
2355 2355
 							$color = $tmpobject->color;
2356
-							$sfortag = '<span class="noborderoncategories"' . ($color ? ' style="background: #' . $color . ';"' : ' style="background: #bbb"') . '>';
2356
+							$sfortag = '<span class="noborderoncategories"'.($color ? ' style="background: #'.$color.';"' : ' style="background: #bbb"').'>';
2357 2357
 							$sfortag .= $tmpobject->getNomUrl(3);
2358 2358
 							$sfortag .= '</span>';
2359 2359
 							$value = $sfortag;
@@ -2565,12 +2565,12 @@  discard block
 block discarded – undo
2565 2565
 		if ($mode == 'create') {
2566 2566
 			// On create mode, force separator group to not be collapsible
2567 2567
 			$extrafield_collapse_display_value = 1;
2568
-			$expand_display = true;	// We force group to be shown expanded
2568
+			$expand_display = true; // We force group to be shown expanded
2569 2569
 			$disabledcookiewrite = 1; // We keep status of group unchanged into the cookie
2570 2570
 		}
2571 2571
 
2572 2572
 		$out = '<'.$tagtype.' id="trextrafieldseparator'.$key.(!empty($object->id) ? '_'.$object->id : '').'" class="trextrafieldseparator trextrafieldseparator'.$key.(!empty($object->id) ? '_'.$object->id : '').'">';
2573
-		$out .= '<'.$tagtype_dyn.' '.(!empty($colspan) ? 'colspan="' . $colspan . '"' : '').'>';
2573
+		$out .= '<'.$tagtype_dyn.' '.(!empty($colspan) ? 'colspan="'.$colspan.'"' : '').'>';
2574 2574
 		// Some js code will be injected here to manage the collapsing of extrafields
2575 2575
 		// Output the picto
2576 2576
 		$out .= '<span class="'.($extrafield_collapse_display_value ? 'cursorpointer ' : '').($extrafield_collapse_display_value == 0 ? 'fas fa-square opacitymedium' : 'far fa-'.(($expand_display ? 'minus' : 'plus').'-square')).'"></span>';
@@ -2652,7 +2652,7 @@  discard block
 block discarded – undo
2652 2652
 					continue;
2653 2653
 				}
2654 2654
 
2655
-				if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && !GETPOSTISSET('options_'.$key) && (! in_array($this->attributes[$object->table_element]['type'][$key], array('boolean', 'checkbox', 'chkbxlst', 'point', 'multipts', 'linestrg', 'polygon', 'duration')))) {
2655
+				if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && !GETPOSTISSET('options_'.$key) && (!in_array($this->attributes[$object->table_element]['type'][$key], array('boolean', 'checkbox', 'chkbxlst', 'point', 'multipts', 'linestrg', 'polygon', 'duration')))) {
2656 2656
 					//when unticking boolean field, it's not set in POST
2657 2657
 					continue;
2658 2658
 				}
@@ -2681,7 +2681,7 @@  discard block
 block discarded – undo
2681 2681
 						$onlykey === '@GETPOSTISSET'
2682 2682
 						&& in_array($this->attributes[$object->table_element]['type'][$key], array('boolean', 'checkbox', 'chkbxlst'))
2683 2683
 						&& in_array(abs($enabled), array(2, 5))
2684
-						&& ! GETPOSTISSET('options_' . $key) // Update hidden checkboxes and multiselect only if they are provided
2684
+						&& !GETPOSTISSET('options_'.$key) // Update hidden checkboxes and multiselect only if they are provided
2685 2685
 					)
2686 2686
 				) {
2687 2687
 					continue;
@@ -2725,8 +2725,8 @@  discard block
 block discarded – undo
2725 2725
 					// Clean parameters
2726 2726
 					$value_key = dol_mktime(GETPOSTINT("options_".$key."hour"), GETPOSTINT("options_".$key."min"), GETPOSTINT("options_".$key."sec"), GETPOSTINT("options_".$key."month"), GETPOSTINT("options_".$key."day"), GETPOSTINT("options_".$key."year"), 'gmt');
2727 2727
 				} elseif (in_array($key_type, array('duration'))) {
2728
-					$value_hours = GETPOSTINT("options_" . $key . "hour");
2729
-					$value_minutes = GETPOSTINT("options_" . $key . "min");
2728
+					$value_hours = GETPOSTINT("options_".$key."hour");
2729
+					$value_minutes = GETPOSTINT("options_".$key."min");
2730 2730
 					$value_key = $value_hours * 3600 + $value_minutes * 60;
2731 2731
 				} elseif (in_array($key_type, array('checkbox', 'chkbxlst'))) {
2732 2732
 					$value_arr = GETPOST("options_".$key, 'array'); // check if an array
@@ -2822,17 +2822,17 @@  discard block
 block discarded – undo
2822 2822
 				}
2823 2823
 
2824 2824
 				if (in_array($key_type, array('date'))) {
2825
-					$dateparamname_start = $keyprefix . 'options_' . $key . $keysuffix . '_start';
2826
-					$dateparamname_end   = $keyprefix . 'options_' . $key . $keysuffix . '_end';
2825
+					$dateparamname_start = $keyprefix.'options_'.$key.$keysuffix.'_start';
2826
+					$dateparamname_end   = $keyprefix.'options_'.$key.$keysuffix.'_end';
2827 2827
 
2828
-					if (GETPOST($dateparamname_start . 'year') || GETPOST($dateparamname_end . 'year')) {
2828
+					if (GETPOST($dateparamname_start.'year') || GETPOST($dateparamname_end.'year')) {
2829 2829
 						$value_key = array();
2830 2830
 						// values provided as a component year, month, day, etc.
2831
-						if (GETPOST($dateparamname_start . 'year')) {
2832
-							$value_key['start'] = dol_mktime(0, 0, 0, GETPOSTINT($dateparamname_start . 'month'), GETPOSTINT($dateparamname_start . 'day'), GETPOSTINT($dateparamname_start . 'year'));
2831
+						if (GETPOST($dateparamname_start.'year')) {
2832
+							$value_key['start'] = dol_mktime(0, 0, 0, GETPOSTINT($dateparamname_start.'month'), GETPOSTINT($dateparamname_start.'day'), GETPOSTINT($dateparamname_start.'year'));
2833 2833
 						}
2834
-						if (GETPOST($dateparamname_end . 'year')) {
2835
-							$value_key['end'] = dol_mktime(23, 59, 59, GETPOSTINT($dateparamname_end . 'month'), GETPOSTINT($dateparamname_end . 'day'), GETPOSTINT($dateparamname_end . 'year'));
2834
+						if (GETPOST($dateparamname_end.'year')) {
2835
+							$value_key['end'] = dol_mktime(23, 59, 59, GETPOSTINT($dateparamname_end.'month'), GETPOSTINT($dateparamname_end.'day'), GETPOSTINT($dateparamname_end.'year'));
2836 2836
 						}
2837 2837
 					} elseif (GETPOST($keyprefix."options_".$key.$keysuffix."year")) {
2838 2838
 						// Clean parameters
@@ -2841,26 +2841,26 @@  discard block
 block discarded – undo
2841 2841
 						continue; // Value was not provided, we should not set it.
2842 2842
 					}
2843 2843
 				} elseif (in_array($key_type, array('datetime', 'datetimegmt'))) {
2844
-					$dateparamname_start = $keyprefix . 'options_' . $key . $keysuffix . '_start';
2845
-					$dateparamname_end   = $keyprefix . 'options_' . $key . $keysuffix . '_end';
2844
+					$dateparamname_start = $keyprefix.'options_'.$key.$keysuffix.'_start';
2845
+					$dateparamname_end   = $keyprefix.'options_'.$key.$keysuffix.'_end';
2846 2846
 
2847
-					if (GETPOST($dateparamname_start . 'year') || GETPOST($dateparamname_end . 'year')) {
2847
+					if (GETPOST($dateparamname_start.'year') || GETPOST($dateparamname_end.'year')) {
2848 2848
 						// values provided as a date pair (start date + end date), each date being broken down as year, month, day, etc.
2849
-						$dateparamname_start_hour = GETPOSTINT($dateparamname_start . 'hour') != '-1' ? GETPOSTINT($dateparamname_start . 'hour') : '00';
2850
-						$dateparamname_start_min = GETPOSTINT($dateparamname_start . 'min') != '-1' ? GETPOSTINT($dateparamname_start . 'min') : '00';
2851
-						$dateparamname_start_sec = GETPOSTINT($dateparamname_start . 'sec') != '-1' ? GETPOSTINT($dateparamname_start . 'sec') : '00';
2852
-						$dateparamname_end_hour = GETPOSTINT($dateparamname_end . 'hour') != '-1' ? GETPOSTINT($dateparamname_end . 'hour') : '23';
2853
-						$dateparamname_end_min = GETPOSTINT($dateparamname_end . 'min') != '-1' ? GETPOSTINT($dateparamname_end . 'min') : '59';
2854
-						$dateparamname_end_sec = GETPOSTINT($dateparamname_end . 'sec') != '-1' ? GETPOSTINT($dateparamname_end . 'sec') : '59';
2849
+						$dateparamname_start_hour = GETPOSTINT($dateparamname_start.'hour') != '-1' ? GETPOSTINT($dateparamname_start.'hour') : '00';
2850
+						$dateparamname_start_min = GETPOSTINT($dateparamname_start.'min') != '-1' ? GETPOSTINT($dateparamname_start.'min') : '00';
2851
+						$dateparamname_start_sec = GETPOSTINT($dateparamname_start.'sec') != '-1' ? GETPOSTINT($dateparamname_start.'sec') : '00';
2852
+						$dateparamname_end_hour = GETPOSTINT($dateparamname_end.'hour') != '-1' ? GETPOSTINT($dateparamname_end.'hour') : '23';
2853
+						$dateparamname_end_min = GETPOSTINT($dateparamname_end.'min') != '-1' ? GETPOSTINT($dateparamname_end.'min') : '59';
2854
+						$dateparamname_end_sec = GETPOSTINT($dateparamname_end.'sec') != '-1' ? GETPOSTINT($dateparamname_end.'sec') : '59';
2855 2855
 						if ($key_type == 'datetimegmt') {
2856 2856
 							$value_key = array(
2857
-								'start' => dol_mktime($dateparamname_start_hour, $dateparamname_start_min, $dateparamname_start_sec, GETPOSTINT($dateparamname_start . 'month'), GETPOSTINT($dateparamname_start . 'day'), GETPOSTINT($dateparamname_start . 'year'), 'gmt'),
2858
-								'end' => dol_mktime($dateparamname_end_hour, $dateparamname_end_min, $dateparamname_end_sec, GETPOSTINT($dateparamname_end . 'month'), GETPOSTINT($dateparamname_end . 'day'), GETPOSTINT($dateparamname_end . 'year'), 'gmt')
2857
+								'start' => dol_mktime($dateparamname_start_hour, $dateparamname_start_min, $dateparamname_start_sec, GETPOSTINT($dateparamname_start.'month'), GETPOSTINT($dateparamname_start.'day'), GETPOSTINT($dateparamname_start.'year'), 'gmt'),
2858
+								'end' => dol_mktime($dateparamname_end_hour, $dateparamname_end_min, $dateparamname_end_sec, GETPOSTINT($dateparamname_end.'month'), GETPOSTINT($dateparamname_end.'day'), GETPOSTINT($dateparamname_end.'year'), 'gmt')
2859 2859
 							);
2860 2860
 						} else {
2861 2861
 							$value_key = array(
2862
-								'start' => dol_mktime($dateparamname_start_hour, $dateparamname_start_min, $dateparamname_start_sec, GETPOSTINT($dateparamname_start . 'month'), GETPOSTINT($dateparamname_start . 'day'), GETPOSTINT($dateparamname_start . 'year'), 'tzuserrel'),
2863
-								'end' => dol_mktime($dateparamname_end_hour, $dateparamname_end_min, $dateparamname_end_sec, GETPOSTINT($dateparamname_end . 'month'), GETPOSTINT($dateparamname_end . 'day'), GETPOSTINT($dateparamname_end . 'year'), 'tzuserrel')
2862
+								'start' => dol_mktime($dateparamname_start_hour, $dateparamname_start_min, $dateparamname_start_sec, GETPOSTINT($dateparamname_start.'month'), GETPOSTINT($dateparamname_start.'day'), GETPOSTINT($dateparamname_start.'year'), 'tzuserrel'),
2863
+								'end' => dol_mktime($dateparamname_end_hour, $dateparamname_end_min, $dateparamname_end_sec, GETPOSTINT($dateparamname_end.'month'), GETPOSTINT($dateparamname_end.'day'), GETPOSTINT($dateparamname_end.'year'), 'tzuserrel')
2864 2864
 							);
2865 2865
 						}
2866 2866
 					} elseif (GETPOST($keyprefix."options_".$key.$keysuffix."year")) {
@@ -2987,6 +2987,6 @@  discard block
 block discarded – undo
2987 2987
 		if ($type == 'sellist') {
2988 2988
 			return ($v == '0');
2989 2989
 		}
2990
-		return empty($v);  // Note empty('0') is also true, tested 7.0 up to 8.3.12
2990
+		return empty($v); // Note empty('0') is also true, tested 7.0 up to 8.3.12
2991 2991
 	}
2992 2992
 }
Please login to merge, or discard this patch.
htdocs/public/onlinesign/newonlinesign.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 
239 239
 $head = '';
240 240
 if (getDolGlobalString('MAIN_SIGN_CSS_URL')) {
241
-	$head = '<link rel="stylesheet" type="text/css" href="' . getDolGlobalString('MAIN_SIGN_CSS_URL').'?lang='.$langs->defaultlang.'">'."\n";
241
+	$head = '<link rel="stylesheet" type="text/css" href="'.getDolGlobalString('MAIN_SIGN_CSS_URL').'?lang='.$langs->defaultlang.'">'."\n";
242 242
 }
243 243
 
244 244
 $conf->dol_hide_topmenu = 1;
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 
283 283
 if ($source == 'proposal' && getDolGlobalString('PROPOSAL_IMAGE_PUBLIC_SIGN')) {
284 284
 	print '<div class="backimagepublicproposalsign">';
285
-	print '<img id="idPROPOSAL_IMAGE_PUBLIC_INTERFACE" src="' . getDolGlobalString('PROPOSAL_IMAGE_PUBLIC_SIGN').'">';
285
+	print '<img id="idPROPOSAL_IMAGE_PUBLIC_INTERFACE" src="'.getDolGlobalString('PROPOSAL_IMAGE_PUBLIC_SIGN').'">';
286 286
 	print '</div>';
287 287
 }
288 288
 
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 	if (preg_match('/^\((.*)\)$/', $conf->global->ONLINE_SIGN_NEWFORM_TEXT, $reg)) {
296 296
 		$text .= $langs->trans($reg[1])."<br>\n";
297 297
 	} else {
298
-		$text .= getDolGlobalString('ONLINE_SIGN_NEWFORM_TEXT') . "<br>\n";
298
+		$text .= getDolGlobalString('ONLINE_SIGN_NEWFORM_TEXT')."<br>\n";
299 299
 	}
300 300
 	$text = '<tr><td align="center"><br>'.$text.'<br></td></tr>'."\n";
301 301
 }
@@ -387,12 +387,12 @@  discard block
 block discarded – undo
387 387
 	$last_main_doc_file = $object->last_main_doc;
388 388
 
389 389
 	if ($object->status == $object::STATUS_VALIDATED) {
390
-		$object->last_main_doc = preg_replace('/_signed-(\d+)/', '', $object->last_main_doc);	// We want to be sure to not work on the signed version
390
+		$object->last_main_doc = preg_replace('/_signed-(\d+)/', '', $object->last_main_doc); // We want to be sure to not work on the signed version
391 391
 
392 392
 		if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT.'/'.$object->last_main_doc)) {
393 393
 			// It seems document has never been generated, or was generated and then deleted.
394 394
 			// So we try to regenerate it with its default template.
395
-			$defaulttemplate = '';		// We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used.
395
+			$defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used.
396 396
 			$object->generateDocument($defaulttemplate, $langs);
397 397
 		}
398 398
 
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 	if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT.'/'.$object->last_main_doc)) {
464 464
 		// It seems document has never been generated, or was generated and then deleted.
465 465
 		// So we try to regenerate it with its default template.
466
-		$defaulttemplate = '';		// We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used.
466
+		$defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used.
467 467
 		$object->generateDocument($defaulttemplate, $langs);
468 468
 	}
469 469
 
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
 	if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT.'/'.$object->last_main_doc)) {
515 515
 		// It seems document has never been generated, or was generated and then deleted.
516 516
 		// So we try to regenerate it with its default template.
517
-		$defaulttemplate = '';		// We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used.
517
+		$defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used.
518 518
 		$object->generateDocument($defaulttemplate, $langs);
519 519
 	}
520 520
 
@@ -538,24 +538,24 @@  discard block
 block discarded – undo
538 538
 	$result = $object->fetch_thirdparty();
539 539
 
540 540
 	// Proposer
541
-	print '<tr class="CTableRow2"><td class="CTableRow2">' . $langs->trans("Proposer");
541
+	print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Proposer");
542 542
 	print '</td><td class="CTableRow2">';
543 543
 	print img_picto('', 'company', 'class="pictofixedwidth"');
544
-	print '<b>' . $creditor . '</b>';
545
-	print '<input type="hidden" name="creditor" value="' . $creditor . '">';
546
-	print '</td></tr>' . "\n";
544
+	print '<b>'.$creditor.'</b>';
545
+	print '<input type="hidden" name="creditor" value="'.$creditor.'">';
546
+	print '</td></tr>'."\n";
547 547
 
548 548
 	// Target
549
-	print '<tr class="CTableRow2"><td class="CTableRow2">' . $langs->trans("ThirdParty");
549
+	print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("ThirdParty");
550 550
 	print '</td><td class="CTableRow2">';
551 551
 	print img_picto('', 'company', 'class="pictofixedwidth"');
552
-	print '<b>' . $object->thirdparty->name . '</b>';
553
-	print '</td></tr>' . "\n";
552
+	print '<b>'.$object->thirdparty->name.'</b>';
553
+	print '</td></tr>'."\n";
554 554
 
555 555
 	// Object
556
-	$text = '<b>' . $langs->trans("Signature" . dol_ucfirst($source) . "Ref", $object->ref) . '</b>';
557
-	print '<tr class="CTableRow2"><td class="CTableRow2">' . $langs->trans("Designation");
558
-	print '</td><td class="CTableRow2">' . $text;
556
+	$text = '<b>'.$langs->trans("Signature".dol_ucfirst($source)."Ref", $object->ref).'</b>';
557
+	print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Designation");
558
+	print '</td><td class="CTableRow2">'.$text;
559 559
 
560 560
 	$last_main_doc_file = $object->last_main_doc;
561 561
 	$diroutput = $conf->societe->multidir_output[$object->thirdparty->entity].'/'
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
 	if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT.'/'.$object->last_main_doc)) {
619 619
 		// It seems document has never been generated, or was generated and then deleted.
620 620
 		// So we try to regenerate it with its default template.
621
-		$defaulttemplate = '';		// We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used.
621
+		$defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used.
622 622
 		$object->generateDocument($defaulttemplate, $langs);
623 623
 	}
624 624
 	$directdownloadlink = $object->getLastMainDocLink('', 0, 0);
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
 	if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT.'/'.$object->last_main_doc)) {
668 668
 		// It seems document has never been generated, or was generated and then deleted.
669 669
 		// So we try to regenerate it with its default template.
670
-		$defaulttemplate = '';		// We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used.
670
+		$defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used.
671 671
 		$object->generateDocument($defaulttemplate, $langs);
672 672
 	}
673 673
 
@@ -727,8 +727,8 @@  discard block
 block discarded – undo
727 727
 	print '</div>';
728 728
 
729 729
 	// Define $urlwithroot
730
-	$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
731
-	$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT;		// This is to use external domain name found into config file
730
+	$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
731
+	$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
732 732
 	//$urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than current. For Paypal payment, we can use internal URL like localhost.
733 733
 	// TODO Replace DOL_URL_ROOT with $urlwithroot ?
734 734
 
Please login to merge, or discard this patch.
htdocs/public/members/new.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 					$to = $adh->makeSubstitution($conf->global->MAIN_INFO_SOCIETE_MAIL);
396 396
 					$from = getDolGlobalString('ADHERENT_MAIL_FROM');
397 397
 					$mailfile = new CMailFile(
398
-						'['.$appli.'] ' . getDolGlobalString('ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT'),
398
+						'['.$appli.'] '.getDolGlobalString('ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT'),
399 399
 						$to,
400 400
 						$from,
401 401
 						$adh->makeSubstitution($conf->global->ADHERENT_AUTOREGISTER_NOTIF_MAIL),
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
 		print '</td></tr>'."\n";
582 582
 	} else {
583 583
 		$adht->fetch(getDolGlobalInt('MEMBER_NEWFORM_FORCETYPE'));
584
-		print '<input type="hidden" id="typeid" name="typeid" value="' . getDolGlobalString('MEMBER_NEWFORM_FORCETYPE').'">';
584
+		print '<input type="hidden" id="typeid" name="typeid" value="'.getDolGlobalString('MEMBER_NEWFORM_FORCETYPE').'">';
585 585
 	}
586 586
 
587 587
 	// Moral/Physic attribute
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
 		print '</td></tr>'."\n";
595 595
 	} else {
596 596
 		//print $morphys[$conf->global->MEMBER_NEWFORM_FORCEMORPHY];
597
-		print '<input type="hidden" id="morphy" name="morphy" value="' . getDolGlobalString('MEMBER_NEWFORM_FORCEMORPHY').'">';
597
+		print '<input type="hidden" id="morphy" name="morphy" value="'.getDolGlobalString('MEMBER_NEWFORM_FORCEMORPHY').'">';
598 598
 	}
599 599
 
600 600
 	// Company   // TODO : optional hide
@@ -692,7 +692,7 @@  discard block
 block discarded – undo
692 692
 	}
693 693
 
694 694
 	// Other attributes
695
-	$parameters['tpl_context'] = 'public';	// define template context to public
695
+	$parameters['tpl_context'] = 'public'; // define template context to public
696 696
 	include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
697 697
 
698 698
 	// Comments
@@ -753,7 +753,7 @@  discard block
 block discarded – undo
753 753
 		$adht = new AdherentType($db);
754 754
 		$adht->fetch($typeid);
755 755
 		$caneditamount = $adht->caneditamount;
756
-		$amountbytype = $adht->amountByType(1);		// Load the array of amount per type
756
+		$amountbytype = $adht->amountByType(1); // Load the array of amount per type
757 757
 
758 758
 		// Set amount for the subscription from the the type and options:
759 759
 		// - First check the amount of the member type.
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
 		// $conf->global->MEMBER_NEWFORM_PAYONLINE is 'paypal', 'paybox' or 'stripe'
776 776
 		print '<tr><td>'.$langs->trans("Subscription");
777 777
 		if (getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO')) {
778
-			print ' - <a href="' . getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>';
778
+			print ' - <a href="'.getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>';
779 779
 		}
780 780
 		print '</td><td class="nowrap">';
781 781
 
@@ -871,10 +871,10 @@  discard block
 block discarded – undo
871 871
 
872 872
 		$i = 0;
873 873
 		while ($i < $num) {
874
-			$objp = $db->fetch_object($result);	// Load the member type and information on it
874
+			$objp = $db->fetch_object($result); // Load the member type and information on it
875 875
 
876 876
 			$caneditamount = $objp->caneditamount;
877
-			$amountbytype = $adht->amountByType(1);		// Load the array of amount per type
877
+			$amountbytype = $adht->amountByType(1); // Load the array of amount per type
878 878
 
879 879
 			print '<tr class="oddeven">';
880 880
 			// Label
Please login to merge, or discard this patch.
htdocs/public/bookcal/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -274,8 +274,8 @@
 block discarded – undo
274 274
 
275 275
 
276 276
 // Define $urlwithroot
277
-$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
278
-$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT;		// This is to use external domain name found into config file
277
+$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
278
+$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
279 279
 //$urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than current. For Paypal payment, we can use internal URL like localhost.
280 280
 // TODO Replace DOL_URL_ROOT with $urlwithroot ?
281 281
 
Please login to merge, or discard this patch.
htdocs/public/company/new.php 1 patch
Spacing   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -52,16 +52,16 @@  discard block
 block discarded – undo
52 52
 
53 53
 // Load Dolibarr environment
54 54
 require '../../main.inc.php';
55
-require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
56
-require_once DOL_DOCUMENT_ROOT . '/core/lib/payments.lib.php';
57
-require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
58
-require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent_type.class.php';
59
-require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
60
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php';
61
-require_once DOL_DOCUMENT_ROOT . '/core/class/cunits.class.php';
62
-require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
63
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formadmin.class.php';
64
-require_once DOL_DOCUMENT_ROOT . '/core/lib/public.lib.php';
55
+require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
56
+require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
57
+require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
58
+require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
59
+require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
60
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
61
+require_once DOL_DOCUMENT_ROOT.'/core/class/cunits.class.php';
62
+require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
63
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
64
+require_once DOL_DOCUMENT_ROOT.'/core/lib/public.lib.php';
65 65
 
66 66
 /**
67 67
  * @var Conf $conf
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
 // permissions
95 95
 
96
-$permissiontoadd 	= $user->hasRight('societe', 'creer');
96
+$permissiontoadd = $user->hasRight('societe', 'creer');
97 97
 
98 98
 // Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
99 99
 $hookmanager->initHooks(array('publicnewmembercard', 'globalcard'));
@@ -149,8 +149,8 @@  discard block
 block discarded – undo
149 149
 	printCommonFooter('public');
150 150
 
151 151
 	if (!empty($conf->use_javascript_ajax)) {
152
-		print "\n" . '<!-- Includes JS Footer of Dolibarr -->' . "\n";
153
-		print '<script src="' . DOL_URL_ROOT . '/core/js/lib_foot.js.php?lang=' . $langs->defaultlang . '"></script>' . "\n";
152
+		print "\n".'<!-- Includes JS Footer of Dolibarr -->'."\n";
153
+		print '<script src="'.DOL_URL_ROOT.'/core/js/lib_foot.js.php?lang='.$langs->defaultlang.'"></script>'."\n";
154 154
 	}
155 155
 
156 156
 	print "</body>\n";
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 		$ok = (array_key_exists($sessionkey, $_SESSION) && (strtolower($_SESSION[$sessionkey]) == strtolower(GETPOST('code'))));
189 189
 		if (!$ok) {
190 190
 			$error++;
191
-			$errmsg .= $langs->trans("ErrorBadValueForCode") . "<br>\n";
191
+			$errmsg .= $langs->trans("ErrorBadValueForCode")."<br>\n";
192 192
 			$action = '';
193 193
 		}
194 194
 	}
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 		$societe->phone = GETPOST('phone', 'alpha');
204 204
 		$societe->fax = GETPOST('fax', 'alpha');
205 205
 		$societe->email = trim(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL));
206
-		$societe->client = 2 ; // our client is a prospect
206
+		$societe->client = 2; // our client is a prospect
207 207
 		$societe->code_client = '-1';
208 208
 		$societe->name_alias = GETPOST('name_alias', 'alphanohtml');
209 209
 		$societe->note_private = GETPOST('note_private', 'alphanohtml');
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 		if (!$error) {
229 229
 			$result = $societe->create($user);
230 230
 			if ($result > 0) {
231
-				require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
231
+				require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
232 232
 				$objectsoc = $societe;
233 233
 
234 234
 				if (!empty($backtopage)) {
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 					$urlback = getDolGlobalString('MEMBER_URL_REDIRECT_SUBSCRIPTION');
238 238
 					// TODO Make replacement of __AMOUNT__, etc...
239 239
 				} else {
240
-					$urlback = $_SERVER["PHP_SELF"] . "?action=added&token=" . newToken();
240
+					$urlback = $_SERVER["PHP_SELF"]."?action=added&token=".newToken();
241 241
 				}
242 242
 			} else {
243 243
 				$error++;
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 	if (!$error) {
250 250
 		$db->commit();
251 251
 
252
-		header("Location: " . $urlback);
252
+		header("Location: ".$urlback);
253 253
 		exit;
254 254
 	} else {
255 255
 		$db->rollback();
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 llxHeaderVierge($langs->trans("ContactUs"));
290 290
 
291 291
 print '<br>';
292
-print load_fiche_titre(img_picto('', 'member_nocolor', 'class="pictofixedwidth"') . ' &nbsp; ' . $langs->trans("ContactUs"), '', '', 0, '', 'center');
292
+print load_fiche_titre(img_picto('', 'member_nocolor', 'class="pictofixedwidth"').' &nbsp; '.$langs->trans("ContactUs"), '', '', 0, '', 'center');
293 293
 
294 294
 
295 295
 print '<div align="center">';
@@ -297,9 +297,9 @@  discard block
 block discarded – undo
297 297
 
298 298
 print '<div class="center subscriptionformhelptext opacitymedium justify">';
299 299
 if (getDolGlobalString('COMPANY_NEWFORM_TEXT')) {
300
-	print $langs->trans(getDolGlobalString('COMPANY_NEWFORM_TEXT')) . "<br>\n";
300
+	print $langs->trans(getDolGlobalString('COMPANY_NEWFORM_TEXT'))."<br>\n";
301 301
 } else {
302
-	print $langs->trans("ContactUsDesc", getDolGlobalString("MAIN_INFO_SOCIETE_MAIL")) . "<br>\n";
302
+	print $langs->trans("ContactUsDesc", getDolGlobalString("MAIN_INFO_SOCIETE_MAIL"))."<br>\n";
303 303
 }
304 304
 print '</div>';
305 305
 
@@ -307,13 +307,13 @@  discard block
 block discarded – undo
307 307
 dol_htmloutput_events();
308 308
 
309 309
 // Print form
310
-print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST" name="newprospect">' . "\n";
311
-print '<input type="hidden" name="token" value="' . newToken() . '" / >';
312
-print '<input type="hidden" name="entity" value="' . $entity . '" />';
310
+print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="newprospect">'."\n";
311
+print '<input type="hidden" name="token" value="'.newToken().'" / >';
312
+print '<input type="hidden" name="entity" value="'.$entity.'" />';
313 313
 print '<input type="hidden" name="action" value="add" />';
314 314
 print '<br>';
315 315
 
316
-$messagemandatory = '<span class="">' . $langs->trans("FieldsWithAreMandatory", '*') . '</span>';
316
+$messagemandatory = '<span class="">'.$langs->trans("FieldsWithAreMandatory", '*').'</span>';
317 317
 //print '<br><span class="opacitymedium">'.$langs->trans("FieldsWithAreMandatory", '*').'</span><br>';
318 318
 //print $langs->trans("FieldsWithIsForPublic",'**').'<br>';
319 319
 
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
 </script>';
350 350
 
351 351
 
352
-print '<table class="border" summary="form to subscribe" id="tablesubscribe">' . "\n";
352
+print '<table class="border" summary="form to subscribe" id="tablesubscribe">'."\n";
353 353
 //Third party name
354 354
 /*
355 355
 if ($objectsoc->particulier || $private) {
@@ -359,30 +359,30 @@  discard block
 block discarded – undo
359 359
 }
360 360
 */
361 361
 print '<tr class="tr-field-thirdparty-name"><td class="titlefieldcreate">'; // text appreas left
362
-print '<input type="hidden" name="ThirdPartyName" value="' . $langs->trans('ThirdPartyName') . '">';
363
-print '<span id="TypeName" class="fieldrequired"  title="' .dol_escape_htmltag($langs->trans("FieldsWithAreMandatory", '*')) . '" >' . $form->editfieldkey('Company', 'name', '', $objectsoc, 0) . '<span class="star"> *</span></span>';
362
+print '<input type="hidden" name="ThirdPartyName" value="'.$langs->trans('ThirdPartyName').'">';
363
+print '<span id="TypeName" class="fieldrequired"  title="'.dol_escape_htmltag($langs->trans("FieldsWithAreMandatory", '*')).'" >'.$form->editfieldkey('Company', 'name', '', $objectsoc, 0).'<span class="star"> *</span></span>';
364 364
 print '</td><td>'; // inline input
365
-print '<input type="text" class="minwidth300" maxlength="128" name="name" id="name" value="' . dol_escape_htmltag($objectsoc->name) . '" autofocus="autofocus">';
365
+print '<input type="text" class="minwidth300" maxlength="128" name="name" id="name" value="'.dol_escape_htmltag($objectsoc->name).'" autofocus="autofocus">';
366 366
 //
367 367
 
368 368
 // Name and lastname
369
-print '<tr><td class="classfortooltip" title="' . dol_escape_htmltag($messagemandatory) . '">' . $langs->trans("Firstname") . ' <span class="star">*</span></td><td><input type="text" name="firstname" class="minwidth150" value="' . dol_escape_htmltag(GETPOST('firstname')) . '"></td></tr>' . "\n";
369
+print '<tr><td class="classfortooltip" title="'.dol_escape_htmltag($messagemandatory).'">'.$langs->trans("Firstname").' <span class="star">*</span></td><td><input type="text" name="firstname" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('firstname')).'"></td></tr>'."\n";
370 370
 
371
-print '<tr><td class="classfortooltip" title="' . dol_escape_htmltag($messagemandatory) . '">' . $langs->trans("Lastname") . ' <span class="star">*</span></td><td><input type="text" name="lastname" class="minwidth150" value="' . dol_escape_htmltag(GETPOST('lastname')) . '"></td></tr>' . "\n";
371
+print '<tr><td class="classfortooltip" title="'.dol_escape_htmltag($messagemandatory).'">'.$langs->trans("Lastname").' <span class="star">*</span></td><td><input type="text" name="lastname" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('lastname')).'"></td></tr>'."\n";
372 372
 
373 373
 // Address
374 374
 print '<tr><td class="tdtop">';
375 375
 print $form->editfieldkey('Address', 'address', '', $objectsoc, 0);
376 376
 print '</td>';
377 377
 print '<td>';
378
-print '<textarea name="address" id="address" class="quatrevingtpercent" rows="' . ROWS_2 . '" wrap="soft">';
378
+print '<textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_2.'" wrap="soft">';
379 379
 print dol_escape_htmltag($objectsoc->address, 0, 1);
380 380
 print '</textarea>';
381 381
 print $form->widgetForTranslation("address", $objectsoc, $permissiontoadd, 'textarea', 'alphanohtml', 'quatrevingtpercent');
382 382
 print '</td></tr>';
383 383
 
384 384
 // Country
385
-print '<tr><td>' . $form->editfieldkey('Country', 'selectcountry_id', '', $objectsoc, 0) . '</td><td class="maxwidthonsmartphone">';
385
+print '<tr><td>'.$form->editfieldkey('Country', 'selectcountry_id', '', $objectsoc, 0).'</td><td class="maxwidthonsmartphone">';
386 386
 print img_picto('', 'country', 'class="pictofixedwidth"');
387 387
 print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $objectsoc->country_id), 'country_id', '', 0, 'minwidth300 maxwidth500 widthcentpercentminusx');
388 388
 if ($user->admin) {
@@ -391,40 +391,40 @@  discard block
 block discarded – undo
391 391
 print '</td></tr>';
392 392
 
393 393
 // Phone / Fax
394
-print '<tr><td>' . $form->editfieldkey('Phone', 'phone', '', $objectsoc, 0) . '</td>';
395
-print '<td>' . img_picto('', 'object_phoning', 'class="pictofixedwidth"') . ' <input type="text" name="phone" id="phone" class="maxwidth200 widthcentpercentminusx" value="' . (GETPOSTISSET('phone') ? GETPOST('phone', 'alpha') : $objectsoc->phone) . '"></td>';
394
+print '<tr><td>'.$form->editfieldkey('Phone', 'phone', '', $objectsoc, 0).'</td>';
395
+print '<td>'.img_picto('', 'object_phoning', 'class="pictofixedwidth"').' <input type="text" name="phone" id="phone" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('phone') ? GETPOST('phone', 'alpha') : $objectsoc->phone).'"></td>';
396 396
 print '</tr>';
397 397
 
398 398
 print '<tr>';
399
-print '<td>' . $form->editfieldkey('Fax', 'fax', '', $objectsoc, 0) . '</td>';
400
-print '<td>' . img_picto('', 'object_phoning_fax', 'class="pictofixedwidth"') . ' <input type="text" name="fax" id="fax" class="maxwidth200 widthcentpercentminusx" value="' . (GETPOSTISSET('fax') ? GETPOST('fax', 'alpha') : $objectsoc->fax) . '"></td>';
399
+print '<td>'.$form->editfieldkey('Fax', 'fax', '', $objectsoc, 0).'</td>';
400
+print '<td>'.img_picto('', 'object_phoning_fax', 'class="pictofixedwidth"').' <input type="text" name="fax" id="fax" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('fax') ? GETPOST('fax', 'alpha') : $objectsoc->fax).'"></td>';
401 401
 print '</tr>';
402 402
 
403 403
 // Email / Web
404
-print '<tr><td>' . $form->editfieldkey('EMail', 'email', '', $objectsoc, 0, 'string', '', !getDolGlobalString('SOCIETE_EMAIL_MANDATORY') ? '' : $conf->global->SOCIETE_EMAIL_MANDATORY) . '</td>';
405
-print '<td>' . img_picto('', 'object_email', 'class="pictofixedwidth"') . ' <input type="text" class="maxwidth200 widthcentpercentminusx" name="email" id="email" value="' . $objectsoc->email . '"></td>';
404
+print '<tr><td>'.$form->editfieldkey('EMail', 'email', '', $objectsoc, 0, 'string', '', !getDolGlobalString('SOCIETE_EMAIL_MANDATORY') ? '' : $conf->global->SOCIETE_EMAIL_MANDATORY).'</td>';
405
+print '<td>'.img_picto('', 'object_email', 'class="pictofixedwidth"').' <input type="text" class="maxwidth200 widthcentpercentminusx" name="email" id="email" value="'.$objectsoc->email.'"></td>';
406 406
 if (isModEnabled('mailing') && getDolGlobalString('THIRDPARTY_SUGGEST_ALSO_ADDRESS_CREATION')) {
407 407
 	if ($conf->browser->layout == 'phone') {
408 408
 		print '</tr><tr>';
409 409
 	}
410
-	print '<td class="individualline noemail">' . $form->editfieldkey($langs->trans('No_Email') . ' (' . $langs->trans('Contact') . ')', 'contact_no_email', '', $objectsoc, 0) . '</td>';
411
-	print '<td class="individualline" ' . (($conf->browser->layout == 'phone') /* || !isModEnabled('mailing') */ ? ' colspan="3"' : '') . '>' . $form->selectyesno('contact_no_email', (GETPOSTISSET("contact_no_email") ? GETPOST("contact_no_email", 'alpha') : (empty($objectsoc->no_email) ? 0 : 1)), 1, false, 1) . '</td>';
410
+	print '<td class="individualline noemail">'.$form->editfieldkey($langs->trans('No_Email').' ('.$langs->trans('Contact').')', 'contact_no_email', '', $objectsoc, 0).'</td>';
411
+	print '<td class="individualline" '.(($conf->browser->layout == 'phone') /* || !isModEnabled('mailing') */ ? ' colspan="3"' : '').'>'.$form->selectyesno('contact_no_email', (GETPOSTISSET("contact_no_email") ? GETPOST("contact_no_email", 'alpha') : (empty($objectsoc->no_email) ? 0 : 1)), 1, false, 1).'</td>';
412 412
 }
413 413
 print '</tr>';
414 414
 
415
-print '<tr><td>' . $form->editfieldkey('Web', 'url', '', $objectsoc, 0) . '</td>';
416
-print '<td>' . img_picto('', 'globe', 'class="pictofixedwidth"') . ' <input type="text" class="maxwidth500 widthcentpercentminusx" name="url" id="url" value="' . $objectsoc->url . '"></td></tr>';
415
+print '<tr><td>'.$form->editfieldkey('Web', 'url', '', $objectsoc, 0).'</td>';
416
+print '<td>'.img_picto('', 'globe', 'class="pictofixedwidth"').' <input type="text" class="maxwidth500 widthcentpercentminusx" name="url" id="url" value="'.$objectsoc->url.'"></td></tr>';
417 417
 
418 418
 
419 419
 // Comments
420 420
 print '<tr>';
421
-print '<td class="tdtop">' . $langs->trans("Comments") . '</td>';
422
-print '<td class="tdtop"><textarea name="note_private" id="note_private" wrap="soft" class="quatrevingtpercent" rows="' . ROWS_3 . '">' . dol_escape_htmltag(GETPOST('note_private', 'restricthtml'), 0, 1) . '</textarea></td>';
423
-print '</tr>' . "\n";
421
+print '<td class="tdtop">'.$langs->trans("Comments").'</td>';
422
+print '<td class="tdtop"><textarea name="note_private" id="note_private" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('note_private', 'restricthtml'), 0, 1).'</textarea></td>';
423
+print '</tr>'."\n";
424 424
 
425 425
 
426 426
 // Other attributes
427
-$parameters['tpl_context'] = 'public';	// define template context to public
427
+$parameters['tpl_context'] = 'public'; // define template context to public
428 428
 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
429 429
 
430 430
 
@@ -432,14 +432,14 @@  discard block
 block discarded – undo
432 432
 
433 433
 // Display Captcha code if is enabled
434 434
 if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA_THIRDPARTY')) {
435
-	require_once DOL_DOCUMENT_ROOT . '/core/lib/security2.lib.php';
436
-	print '<tr><td class="titlefield"><label for="email"><span class="fieldrequired">' . $langs->trans("SecurityCode") . '</span></label></td><td>';
435
+	require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
436
+	print '<tr><td class="titlefield"><label for="email"><span class="fieldrequired">'.$langs->trans("SecurityCode").'</span></label></td><td>';
437 437
 	print '<span class="span-icon-security inline-block">';
438
-	print '<input id="securitycode" placeholder="' . $langs->trans("SecurityCode") . '" class="flat input-icon-security width150" type="text" maxlength="5" name="code" tabindex="3" />';
438
+	print '<input id="securitycode" placeholder="'.$langs->trans("SecurityCode").'" class="flat input-icon-security width150" type="text" maxlength="5" name="code" tabindex="3" />';
439 439
 	print '</span>';
440 440
 	print '<span class="nowrap inline-block">';
441
-	print '<img class="inline-block valignmiddle" src="' . DOL_URL_ROOT . '/core/antispamimage.php" border="0" width="80" height="32" id="img_securitycode" />';
442
-	print '<a class="inline-block valignmiddle" href="' . $_SERVER['PHP_SELF'] . '" tabindex="4" data-role="button">' . img_picto($langs->trans("Refresh"), 'refresh', 'id="captcha_refresh_img"') . '</a>';
441
+	print '<img class="inline-block valignmiddle" src="'.DOL_URL_ROOT.'/core/antispamimage.php" border="0" width="80" height="32" id="img_securitycode" />';
442
+	print '<a class="inline-block valignmiddle" href="'.$_SERVER['PHP_SELF'].'" tabindex="4" data-role="button">'.img_picto($langs->trans("Refresh"), 'refresh', 'id="captcha_refresh_img"').'</a>';
443 443
 	print '</span>';
444 444
 	print '</td></tr>';
445 445
 }
@@ -450,9 +450,9 @@  discard block
 block discarded – undo
450 450
 
451 451
 // Save / Submit
452 452
 print '<div class="center">';
453
-print '<input type="submit" value="' . $langs->trans("Send") . '" id="submitsave" class="button">';
453
+print '<input type="submit" value="'.$langs->trans("Send").'" id="submitsave" class="button">';
454 454
 if (!empty($backtopage)) {
455
-	print ' &nbsp; &nbsp; <input type="submit" value="' . $langs->trans("Cancel") . '" id="submitcancel" class="button button-cancel">';
455
+	print ' &nbsp; &nbsp; <input type="submit" value="'.$langs->trans("Cancel").'" id="submitcancel" class="button button-cancel">';
456 456
 }
457 457
 print '</div>';
458 458
 
Please login to merge, or discard this patch.
htdocs/public/project/new.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 		} else {
202 202
 			// Create the prospect
203 203
 			if (GETPOST('societe', 'alpha')) {
204
-				$thirdparty->name =  GETPOST('societe', 'alpha');
204
+				$thirdparty->name = GETPOST('societe', 'alpha');
205 205
 				$thirdparty->name_alias = dolGetFirstLastname(GETPOST('firstname', 'alpha'), GETPOST('lastname', 'alpha'));
206 206
 			} else {
207 207
 				$thirdparty->name = dolGetFirstLastname(GETPOST('firstname', 'alpha'), GETPOST('lastname', 'alpha'));
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
 }
534 534
 
535 535
 // Other attributes
536
-$parameters['tpl_context'] = 'public';	// define template context to public
536
+$parameters['tpl_context'] = 'public'; // define template context to public
537 537
 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
538 538
 // Comments
539 539
 print '<tr>';
Please login to merge, or discard this patch.
htdocs/public/partnership/new.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 
209 209
 		$partnership->status                 = 0;
210 210
 		$partnership->note_private           = GETPOST('note_private');
211
-		$partnership->date_creation 		 = dol_now();
211
+		$partnership->date_creation = dol_now();
212 212
 		$partnership->date_partnership_start = dol_now();
213 213
 		$partnership->fk_user_creat          = 0;
214 214
 		$partnership->fk_type                = GETPOSTINT('partnershiptype');
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
 
589 589
 if (getDolGlobalInt('PARTNERSHIP_NEWFORM_FORCETYPE')) {
590 590
 	print $listofpartnership[getDolGlobalInt('PARTNERSHIP_NEWFORM_FORCETYPE')];
591
-	print '<input type="hidden" id="partnershiptype" name="partnershiptype" value="' . getDolGlobalInt('PARTNERSHIP_NEWFORM_FORCETYPE').'">';
591
+	print '<input type="hidden" id="partnershiptype" name="partnershiptype" value="'.getDolGlobalInt('PARTNERSHIP_NEWFORM_FORCETYPE').'">';
592 592
 }
593 593
 
594 594
 print '<table class="border" summary="form to subscribe" id="tablesubscribe">'."\n";
@@ -665,7 +665,7 @@  discard block
 block discarded – undo
665 665
 //print '<tr><td>'.$langs->trans("URLPhoto").'</td><td><input type="text" name="photo" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('photo')).'"></td></tr>'."\n";
666 666
 // Other attributes
667 667
 $parameters['tdclass'] = 'titlefieldauto';
668
-$parameters['tpl_context'] = 'public';	// define template context to public
668
+$parameters['tpl_context'] = 'public'; // define template context to public
669 669
 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
670 670
 // Comments
671 671
 print '<tr>';
Please login to merge, or discard this patch.