Completed
Branch develop (447d8b)
by
unknown
25:30
created
htdocs/adherents/class/adherent.class.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -843,7 +843,7 @@  discard block
 block discarded – undo
843 843
 		$sql .= ", login = ".($this->login ? "'".$this->db->escape($this->login)."'" : "null");
844 844
 		$sql .= ", societe = ".($this->company ? "'".$this->db->escape($this->company)."'" : ($this->societe ? "'".$this->db->escape($this->societe)."'" : "null"));
845 845
 		if ($this->socid) {
846
-			$sql .= ", fk_soc = ".($this->socid > 0 ? (int) $this->socid : "null");	 // Must be modified only when creating from a third-party
846
+			$sql .= ", fk_soc = ".($this->socid > 0 ? (int) $this->socid : "null"); // Must be modified only when creating from a third-party
847 847
 		}
848 848
 		$sql .= ", address = ".($this->address ? "'".$this->db->escape($this->address)."'" : "null");
849 849
 		$sql .= ", zip = ".($this->zip ? "'".$this->db->escape($this->zip)."'" : "null");
@@ -1216,7 +1216,7 @@  discard block
 block discarded – undo
1216 1216
 		global $conf, $langs, $hookmanager, $user, $action;
1217 1217
 
1218 1218
 		$error = 0;
1219
-		$member_origin = new Adherent($this->db);		// The member that we will delete
1219
+		$member_origin = new Adherent($this->db); // The member that we will delete
1220 1220
 
1221 1221
 		dol_syslog("mergeMembers merge member id=".$member_origin_id." (will be deleted) into the member id=".$this->id);
1222 1222
 		if ($member_origin->fetch($member_origin_id) < 1) {
@@ -1227,7 +1227,7 @@  discard block
 block discarded – undo
1227 1227
 		if (!$error) {
1228 1228
 			$this->db->begin();
1229 1229
 			$listofproperties = array(
1230
-				'ref_ext', 'civility', 'lastname', 'firstname', 'morphy', 'societe', 'socid', 'user_id','address',
1230
+				'ref_ext', 'civility', 'lastname', 'firstname', 'morphy', 'societe', 'socid', 'user_id', 'address',
1231 1231
 				'zip', 'town', 'state_id', 'country', 'phone', 'phone_perso', 'phone_mobile', 'email',
1232 1232
 				'url', 'socialnetworks', 'birth', 'gender', 'photo', 'public', 'datefin', 'default_lang',
1233 1233
 				'canvas', 'model_pdf', 'import_key'
@@ -2477,7 +2477,7 @@  discard block
 block discarded – undo
2477 2477
 		$datas['divopen'] = '<div class="centpercent">';
2478 2478
 		$datas['picto'] = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Member").'</u> '.$this->getLibStatut(4);
2479 2479
 		if (!empty($this->morphy)) {
2480
-			$datas['picto'] .= '&nbsp;' . $this->getmorphylib('', 1);
2480
+			$datas['picto'] .= '&nbsp;'.$this->getmorphylib('', 1);
2481 2481
 		}
2482 2482
 		if (!empty($this->ref)) {
2483 2483
 			$datas['ref'] = '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
@@ -2497,9 +2497,9 @@  discard block
 block discarded – undo
2497 2497
 		$datas['address'] = '<br><b>'.$langs->trans("Address").':</b> '.dol_format_address($this, 1, ' ', $langs);
2498 2498
 		// show categories for this record only in ajax to not overload lists
2499 2499
 		if (isModEnabled('category') && !$nofetch) {
2500
-			require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
2500
+			require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
2501 2501
 			$form = new Form($this->db);
2502
-			$datas['categories'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_MEMBER, 1);
2502
+			$datas['categories'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_MEMBER, 1);
2503 2503
 		}
2504 2504
 		$datas['divclose'] = '</div>';
2505 2505
 
@@ -2546,9 +2546,9 @@  discard block
 block discarded – undo
2546 2546
 			$label = implode($this->getTooltipContentArray($params));
2547 2547
 		}
2548 2548
 
2549
-		$baseurl = DOL_URL_ROOT . '/adherents/card.php';
2549
+		$baseurl = DOL_URL_ROOT.'/adherents/card.php';
2550 2550
 		if ($option == 'subscription') {
2551
-			$baseurl = DOL_URL_ROOT . '/adherents/subscription.php';
2551
+			$baseurl = DOL_URL_ROOT.'/adherents/subscription.php';
2552 2552
 		}
2553 2553
 		$query = ['rowid' => $this->id];
2554 2554
 
@@ -2626,7 +2626,7 @@  discard block
 block discarded – undo
2626 2626
 			}
2627 2627
 		}
2628 2628
 		global $action;
2629
-		$hookmanager->initHooks(array($this->element . 'dao'));
2629
+		$hookmanager->initHooks(array($this->element.'dao'));
2630 2630
 		$parameters = array('id' => $this->id, 'getnomurl' => &$result);
2631 2631
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
2632 2632
 		if ($reshook > 0) {
@@ -2937,13 +2937,13 @@  discard block
 block discarded – undo
2937 2937
 		global $conf;
2938 2938
 		$dn = '';
2939 2939
 		if ($mode == 0) {
2940
-			$dn = getDolGlobalString('LDAP_KEY_MEMBERS') . "=".$info[getDolGlobalString('LDAP_KEY_MEMBERS')]."," . getDolGlobalString('LDAP_MEMBER_DN');
2940
+			$dn = getDolGlobalString('LDAP_KEY_MEMBERS')."=".$info[getDolGlobalString('LDAP_KEY_MEMBERS')].",".getDolGlobalString('LDAP_MEMBER_DN');
2941 2941
 		}
2942 2942
 		if ($mode == 1) {
2943 2943
 			$dn = getDolGlobalString('LDAP_MEMBER_DN');
2944 2944
 		}
2945 2945
 		if ($mode == 2) {
2946
-			$dn = getDolGlobalString('LDAP_KEY_MEMBERS') . "=".$info[getDolGlobalString('LDAP_KEY_MEMBERS')];
2946
+			$dn = getDolGlobalString('LDAP_KEY_MEMBERS')."=".$info[getDolGlobalString('LDAP_KEY_MEMBERS')];
2947 2947
 		}
2948 2948
 		return $dn;
2949 2949
 	}
@@ -3497,7 +3497,7 @@  discard block
 block discarded – undo
3497 3497
 		}
3498 3498
 		$return .= '</span>';
3499 3499
 		$return .= '<div class="info-box-content">';
3500
-		$return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">' . $this->getNomUrl() . '</span>';
3500
+		$return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.$this->getNomUrl().'</span>';
3501 3501
 		if ($selected >= 0) {
3502 3502
 			$return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
3503 3503
 		}
Please login to merge, or discard this patch.
htdocs/adherents/class/subscription.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 				$this->dateh          = $this->db->jdate($obj->dateh);
265 265
 				$this->datef          = $this->db->jdate($obj->datef);
266 266
 				$this->amount         = $obj->subscription;
267
-				$this->note           = $obj->note_public;	// deprecated
267
+				$this->note           = $obj->note_public; // deprecated
268 268
 				$this->note_public    = $obj->note_public;
269 269
 				$this->fk_bank        = $obj->fk_bank;
270 270
 				return 1;
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
 		if (!empty($this->datef)) {
444 444
 			$label .= '<br><b>'.$langs->trans('DateEnd').':</b> '.dol_print_date($this->datef, 'day');
445 445
 		}
446
-		$baseurl = DOL_URL_ROOT . '/adherents/subscription/card.php';
446
+		$baseurl = DOL_URL_ROOT.'/adherents/subscription/card.php';
447 447
 		$query = ['rowid' => $this->id];
448 448
 		if ($option != 'nolink') {
449 449
 			// Add param to save lastsearch_values or not
Please login to merge, or discard this patch.
htdocs/adherents/type.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 $action = GETPOST('action', 'aZ09');
55 55
 $massaction = GETPOST('massaction', 'alpha');
56 56
 $cancel = GETPOST('cancel', 'alpha');
57
-$toselect 	= GETPOST('toselect', 'array:int');
57
+$toselect = GETPOST('toselect', 'array:int');
58 58
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
59 59
 $backtopage = GETPOST('backtopage', 'alpha');
60 60
 $mode = GETPOST('mode', 'alpha');
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 	$object->note_public = trim($comment);
181 181
 	$object->note_private = '';
182 182
 	$object->mail_valid = trim($mail_valid);
183
-	$object->vote = $vote;  // $vote is already int
183
+	$object->vote = $vote; // $vote is already int
184 184
 
185 185
 	// Fill array 'array_options' with data from add form
186 186
 	$ret = $extrafields->setOptionalsFromPost(null, $object);
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 			$urltogo = $backtopage ? str_replace('__ID__', (string) $id, $backtopage) : $backurlforlist;
215 215
 			$urltogo = preg_replace('/--IDFORBACKTOPAGE--/', (string) $object->id, $urltogo); // New method to autoselect field created after a New on another form object creation
216 216
 
217
-			header("Location: " . $urltogo);
217
+			header("Location: ".$urltogo);
218 218
 			exit;
219 219
 		} else {
220 220
 			setEventMessages($object->error, $object->errors, 'errors');
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 if ($action == 'update' && $user->hasRight('adherent', 'configurer')) {
229 229
 	$object->fetch($rowid);
230 230
 
231
-	$object->oldcopy = dol_clone($object, 2);  // @phan-suppress-current-line PhanTypeMismatchProperty
231
+	$object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty
232 232
 
233 233
 	$object->label = trim($label);
234 234
 	$object->morphy	= trim($morphy);
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 	$object->note_public = trim($comment);
242 242
 	$object->note_private = '';
243 243
 	$object->mail_valid = trim($mail_valid);
244
-	$object->vote = $vote;  // $vote is already int.
244
+	$object->vote = $vote; // $vote is already int.
245 245
 
246 246
 	// Fill array 'array_options' with data from add form
247 247
 	$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 		print '<input type="hidden" name="mode" value="'.$mode.'">';
346 346
 
347 347
 		$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
348
-		$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column);  // This also change content of $arrayfields with user setup
348
+		$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column); // This also change content of $arrayfields with user setup
349 349
 		$selectedfields = (($mode != 'kanban' && $mode != 'kanbangroupby') ? $htmlofselectarray : '');
350 350
 		//$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
351 351
 
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
 	print '<table class="border centpercent">';
548 548
 	print '<tbody>';
549 549
 
550
-	print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Label").'</td><td><input type="text" class="minwidth200" name="label" value= "'. $label. '" autofocus="autofocus"></td></tr>';
550
+	print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Label").'</td><td><input type="text" class="minwidth200" name="label" value= "'.$label.'" autofocus="autofocus"></td></tr>';
551 551
 
552 552
 	print '<tr><td>'.$langs->trans("Status").'</td><td>';
553 553
 	print $form->selectarray('status', array('0' => $langs->trans('ActivityCeased'), '1' => $langs->trans('InActivity')), 1, 0, 0, 0, '', 0, 0, 0, '', 'minwidth100');
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
 	print '</td></tr>';
581 581
 
582 582
 	print '<tr><td>'.$langs->trans("Duration").'</td><td colspan="3">';
583
-	print '<input name="duration_value" size="5" value="'. $duration_value .'"> ';
583
+	print '<input name="duration_value" size="5" value="'.$duration_value.'"> ';
584 584
 	print $formproduct->selectMeasuringUnits("duration_unit", "time", GETPOSTISSET("duration_unit") ? GETPOST('duration_unit', 'aZ09') : 'y', 0, 1);
585 585
 	print '</td></tr>';
586 586
 
@@ -831,7 +831,7 @@  discard block
 block discarded – undo
831 831
 
832 832
 			$query = ['rowid' => $object->id];
833 833
 			if (!empty($mode)) {
834
-				$query+= ['mode' => $mode];
834
+				$query += ['mode' => $mode];
835 835
 			}
836 836
 			if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
837 837
 				$query += ['contextpage' => $contextpage];
@@ -857,7 +857,7 @@  discard block
 block discarded – undo
857 857
 			if (!empty($filter)) {
858 858
 				$query += ['filter' => $filter];
859 859
 			}
860
-			$param = '&' . http_build_query($query);
860
+			$param = '&'.http_build_query($query);
861 861
 
862 862
 			if ($sall) {
863 863
 				print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ".$sall;
Please login to merge, or discard this patch.
htdocs/main.inc.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 		session_set_cookie_params($sessioncookieparams);
138 138
 	}
139 139
 	session_name($sessionname);
140
-	dol_session_start();	// This call the open and read of session handler
140
+	dol_session_start(); // This call the open and read of session handler
141 141
 	//exit;	// this exist generates a call to write and close
142 142
 }
143 143
 
@@ -174,12 +174,12 @@  discard block
 block discarded – undo
174 174
 	if (!$ok) {
175 175
 		if (session_id() && isset($_SESSION["dol_login"]) && !in_array($_SESSION["dol_login"], explode(';', getDolGlobalString('MAIN_ONLY_LOGIN_ALLOWED')))) {
176 176
 			print 'Sorry, your application is offline.'."\n";
177
-			print 'You are logged with user "'.$_SESSION["dol_login"].'" and only administrator users (' . str_replace(';', ', ', getDolGlobalString('MAIN_ONLY_LOGIN_ALLOWED')).') is allowed to connect for the moment.'."\n";
178
-			$nexturl = dolBuildUrl(DOL_URL_ROOT . '/user/logout.php', [], true);
177
+			print 'You are logged with user "'.$_SESSION["dol_login"].'" and only administrator users ('.str_replace(';', ', ', getDolGlobalString('MAIN_ONLY_LOGIN_ALLOWED')).') is allowed to connect for the moment.'."\n";
178
+			$nexturl = dolBuildUrl(DOL_URL_ROOT.'/user/logout.php', [], true);
179 179
 			print 'Please try later or <a href="'.$nexturl.'">click here to disconnect and change login user</a>...'."\n";
180 180
 		} else {
181
-			print 'Sorry, your application is offline. Only administrator users (' . str_replace(';', ', ', getDolGlobalString('MAIN_ONLY_LOGIN_ALLOWED')).') is allowed to connect for the moment.'."\n";
182
-			$nexturl = dolBuildUrl(DOL_URL_ROOT . '/');
181
+			print 'Sorry, your application is offline. Only administrator users ('.str_replace(';', ', ', getDolGlobalString('MAIN_ONLY_LOGIN_ALLOWED')).') is allowed to connect for the moment.'."\n";
182
+			$nexturl = dolBuildUrl(DOL_URL_ROOT.'/');
183 183
 			print 'Please try later or <a href="'.$nexturl.'">click here to change login user</a>...'."\n";
184 184
 		}
185 185
 		exit;
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
 					print "Access to this page this way (POST method or GET with a sensible value for 'action' parameter) is refused by CSRF protection in main.inc.php. Token not provided.\n";
395 395
 					print "If you access your server behind a proxy using url rewriting and the parameter is provided by caller, you might check that all HTTP header are propagated (or add the line \$dolibarr_nocsrfcheck=1 into your conf.php file or MAIN_SECURITY_CSRF_WITH_TOKEN to 0";
396 396
 					if (getDolGlobalString('MAIN_SECURITY_CSRF_WITH_TOKEN')) {
397
-						print " instead of " . getDolGlobalString('MAIN_SECURITY_CSRF_WITH_TOKEN');
397
+						print " instead of ".getDolGlobalString('MAIN_SECURITY_CSRF_WITH_TOKEN');
398 398
 					}
399 399
 					print " into setup).\n";
400 400
 				}
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 		unset($_GET['action']);
423 423
 		unset($_GET['confirmmassaction']);
424 424
 		unset($_GET['massaction']);
425
-		unset($_GET['token']);			// TODO Make a redirect if we have a token in url to remove it ?
425
+		unset($_GET['token']); // TODO Make a redirect if we have a token in url to remove it ?
426 426
 		if (isset($savid)) {
427 427
 			$_POST['id'] = ((int) $savid);
428 428
 		}
@@ -444,18 +444,18 @@  discard block
 block discarded – undo
444 444
 	foreach ($disabled_modules as $module) {
445 445
 		if ($module) {
446 446
 			if (empty($conf->$module)) {
447
-				$conf->$module = new stdClass(); 	// To avoid warnings
447
+				$conf->$module = new stdClass(); // To avoid warnings
448 448
 			}
449 449
 
450
-			$conf->$module->enabled = false;		// Old usage
450
+			$conf->$module->enabled = false; // Old usage
451 451
 			unset($conf->modules[$module]);
452 452
 
453 453
 			foreach ($modulepartkeys as $modulepartkey) {
454 454
 				unset($conf->modules_parts[$modulepartkey][$module]);
455 455
 			}
456 456
 			if ($module == 'fournisseur') {		// Special case
457
-				$conf->supplier_order->enabled = 0;		// Old usage
458
-				$conf->supplier_invoice->enabled = 0;	// Old usage
457
+				$conf->supplier_order->enabled = 0; // Old usage
458
+				$conf->supplier_invoice->enabled = 0; // Old usage
459 459
 				unset($conf->modules['supplier_order']);
460 460
 				unset($conf->modules['supplier_invoice']);
461 461
 			}
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
 				if ($dol_use_jmobile) {
553 553
 					$query += ['dol_use_jmobile='.$dol_use_jmobile];
554 554
 				}
555
-				header("Location: " . dolBuildUrl(DOL_URL_ROOT . '/public/demo/index.php', $query));
555
+				header("Location: ".dolBuildUrl(DOL_URL_ROOT.'/public/demo/index.php', $query));
556 556
 				exit;
557 557
 			}
558 558
 		}
@@ -600,12 +600,12 @@  discard block
 block discarded – undo
600 600
 					if (is_object($captchaobj) && method_exists($captchaobj, 'validateCodeAfterLoginSubmit')) {
601 601
 						$ok = $captchaobj->validateCodeAfterLoginSubmit(); // @phan-suppress-current-line PhanUndeclaredMethod
602 602
 					} else {
603
-						$_SESSION["dol_loginmesg"] =  'Error, the captcha handler '.get_class($captchaobj).' does not have any method validateCodeAfterLoginSubmit()';
603
+						$_SESSION["dol_loginmesg"] = 'Error, the captcha handler '.get_class($captchaobj).' does not have any method validateCodeAfterLoginSubmit()';
604 604
 						$test = false;
605 605
 						$error++;
606 606
 					}
607 607
 				} else {
608
-					$_SESSION["dol_loginmesg"] =  'Error, the captcha handler class '.$classname.' was not found after the include';
608
+					$_SESSION["dol_loginmesg"] = 'Error, the captcha handler class '.$classname.' was not found after the include';
609 609
 					$test = false;
610 610
 					$error++;
611 611
 				}
@@ -649,7 +649,7 @@  discard block
 block discarded – undo
649 649
 
650 650
 		$allowedmethodtopostusername = 3;
651 651
 		if (defined('MAIN_AUTHENTICATION_POST_METHOD')) {
652
-			$allowedmethodtopostusername = constant('MAIN_AUTHENTICATION_POST_METHOD');	// Note a value of 2 is not compatible with some authentication methods that put username as GET parameter
652
+			$allowedmethodtopostusername = constant('MAIN_AUTHENTICATION_POST_METHOD'); // Note a value of 2 is not compatible with some authentication methods that put username as GET parameter
653 653
 		}
654 654
 		// TODO Remove use of $_COOKIE['login_dolibarr'] by replacing line with $usertotest = GETPOST("username", "alpha", $allowedmethodtopostusername); ?
655 655
 		$usertotest = (!empty($_COOKIE['login_dolibarr']) ? preg_replace('/[^a-zA-Z0-9_@\-\.]/', '', $_COOKIE['login_dolibarr']) : GETPOST("username", "alpha", $allowedmethodtopostusername));
@@ -798,7 +798,7 @@  discard block
 block discarded – undo
798 798
 				}
799 799
 
800 800
 				// Show login form
801
-				dol_loginfunction($langs, $conf, (!empty($mysoc) ? $mysoc : ''));	// This include http headers
801
+				dol_loginfunction($langs, $conf, (!empty($mysoc) ? $mysoc : '')); // This include http headers
802 802
 			}
803 803
 			exit;
804 804
 		}
@@ -859,7 +859,7 @@  discard block
 block discarded – undo
859 859
 			if (GETPOST('lang', 'aZ09')) {
860 860
 				$paramsurl += ['lang' => (string) GETPOST('lang', 'aZ09')];
861 861
 			}
862
-			header('Location: '.dolBuildUrl(DOL_URL_ROOT . '/index.php', $paramsurl));
862
+			header('Location: '.dolBuildUrl(DOL_URL_ROOT.'/index.php', $paramsurl));
863 863
 			exit;
864 864
 		} else {
865 865
 			// User is loaded, we may need to change language for him according to its choice
@@ -1157,7 +1157,7 @@  discard block
 block discarded – undo
1157 1157
 } else {
1158 1158
 	// We may have NOLOGIN set, but NOREQUIREUSER not
1159 1159
 	if (!empty($user) && method_exists($user, 'loadDefaultValues') && !defined('NODEFAULTVALUES')) {
1160
-		$user->loadDefaultValues();		// Load default values for everybody (works even if $user->id = 0
1160
+		$user->loadDefaultValues(); // Load default values for everybody (works even if $user->id = 0
1161 1161
 	}
1162 1162
 }
1163 1163
 
@@ -1220,7 +1220,7 @@  discard block
 block discarded – undo
1220 1220
 	$conf->dol_optimize_smallscreen = 1;
1221 1221
 
1222 1222
 	if (getDolGlobalInt('PRODUIT_DESC_IN_FORM') == 1) {
1223
-		$conf->global->PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE = 0;	// This was set to PRODUIT_DESC_IN_FORM and is forced to 0 if smartphone in this case
1223
+		$conf->global->PRODUIT_DESC_IN_FORM_ACCORDING_TO_DEVICE = 0; // This was set to PRODUIT_DESC_IN_FORM and is forced to 0 if smartphone in this case
1224 1224
 	}
1225 1225
 }
1226 1226
 // Replace themes bugged with jmobile with eldy
@@ -1308,7 +1308,7 @@  discard block
 block discarded – undo
1308 1308
 	define('ROWS_9', 8);
1309 1309
 }
1310 1310
 
1311
-$heightforframes = 52;	// Used by frames.php page
1311
+$heightforframes = 52; // Used by frames.php page
1312 1312
 
1313 1313
 // Init menu manager
1314 1314
 if (!defined('NOREQUIREMENU')) {
@@ -1348,7 +1348,7 @@  discard block
 block discarded – undo
1348 1348
 
1349 1349
 if (!empty(GETPOST('seteventmessages', 'alpha'))) {
1350 1350
 	$message = GETPOST('seteventmessages', 'alpha');
1351
-	$messages  = explode(',', $message);
1351
+	$messages = explode(',', $message);
1352 1352
 	foreach ($messages as $key => $msg) {
1353 1353
 		$tmp = explode(':', $msg);
1354 1354
 		setEventMessages($tmp[0], null, !empty($tmp[1]) ? $tmp[1] : 'mesgs');
@@ -1687,7 +1687,7 @@  discard block
 block discarded – undo
1687 1687
 		}
1688 1688
 
1689 1689
 		if (getDolGlobalString('THEME_ELDY_TOPMENU_BACK1')) {
1690
-			print '<meta name="theme-color" content="rgb(' . getDolGlobalString('THEME_ELDY_TOPMENU_BACK1').')">'."\n";
1690
+			print '<meta name="theme-color" content="rgb('.getDolGlobalString('THEME_ELDY_TOPMENU_BACK1').')">'."\n";
1691 1691
 		}
1692 1692
 
1693 1693
 		// Auto refresh page
@@ -1776,9 +1776,9 @@  discard block
 block discarded – undo
1776 1776
 					$jquerytheme = getDolGlobalString('MAIN_USE_JQUERY_THEME');
1777 1777
 				}
1778 1778
 				if (constant('JS_JQUERY_UI')) {
1779
-					print '<link rel="stylesheet" type="text/css" href="' . JS_JQUERY_UI . 'css/' . $jquerytheme . '/jquery-ui.min.css' . ($ext ? '?' . $ext : '') . '">' . "\n"; // Forced JQuery
1779
+					print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css'.($ext ? '?'.$ext : '').'">'."\n"; // Forced JQuery
1780 1780
 				} else {
1781
-					print '<link rel="stylesheet" type="text/css" href="' . DOL_URL_ROOT . '/includes/jquery/css/' . $jquerytheme . '/jquery-ui.css' . ($ext ? '?' . $ext : '') . '">' . "\n"; // JQuery
1781
+					print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui.css'.($ext ? '?'.$ext : '').'">'."\n"; // JQuery
1782 1782
 				}
1783 1783
 			}
1784 1784
 			if (!defined('DISABLE_JQUERY_JNOTIFY')) {
@@ -1811,7 +1811,7 @@  discard block
 block discarded – undo
1811 1811
 
1812 1812
 		if (!defined('DISABLE_CSS_DEFAULT_THEME')) {
1813 1813
 			print '<!-- Includes CSS for Dolibarr theme -->'."\n";
1814
-			print '<link rel="stylesheet" type="text/css" href="' . $themepath . $themeparam . '">' . "\n";
1814
+			print '<link rel="stylesheet" type="text/css" href="'.$themepath.$themeparam.'">'."\n";
1815 1815
 		}
1816 1816
 
1817 1817
 		// To fix old chrome bug
@@ -1885,9 +1885,9 @@  discard block
 block discarded – undo
1885 1885
 			}
1886 1886
 			if (!defined('DISABLE_JQUERY_UI')) {
1887 1887
 				if (defined('JS_JQUERY_UI') && constant('JS_JQUERY_UI')) {
1888
-					print '<script nonce="' . getNonce() . '" src="' . JS_JQUERY_UI . 'jquery-ui.min.js' . ($ext ? '?' . $ext : '') . '"></script>' . "\n";
1888
+					print '<script nonce="'.getNonce().'" src="'.JS_JQUERY_UI.'jquery-ui.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n";
1889 1889
 				} else {
1890
-					print '<script nonce="' . getNonce() . '" src="' . DOL_URL_ROOT . '/includes/jquery/js/jquery-ui.min.js' . ($ext ? '?' . $ext : '') . '"></script>' . "\n";
1890
+					print '<script nonce="'.getNonce().'" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-ui.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n";
1891 1891
 				}
1892 1892
 			}
1893 1893
 			// jQuery jnotify
@@ -1977,7 +1977,7 @@  discard block
 block discarded – undo
1977 1977
 			// Global js function
1978 1978
 			print '<!-- Includes JS of Dolibarr -->'."\n";
1979 1979
 			if (!defined('DISABLE_LIB_HEAD_JS')) {
1980
-				print '<script nonce="' . getNonce() . '" src="' . DOL_URL_ROOT . '/core/js/lib_head.js.php?lang=' . $langs->defaultlang . ($ext ? '&amp;' . $ext : '') . '"></script>' . "\n";
1980
+				print '<script nonce="'.getNonce().'" src="'.DOL_URL_ROOT.'/core/js/lib_head.js.php?lang='.$langs->defaultlang.($ext ? '&amp;'.$ext : '').'"></script>'."\n";
1981 1981
 			}
1982 1982
 
1983 1983
 			// Leaflet
@@ -2028,7 +2028,7 @@  discard block
 block discarded – undo
2028 2028
 			print $head."\n";
2029 2029
 		}
2030 2030
 		if (getDolGlobalString('MAIN_HTML_HEADER')) {
2031
-			print getDolGlobalString('MAIN_HTML_HEADER') . "\n";
2031
+			print getDolGlobalString('MAIN_HTML_HEADER')."\n";
2032 2032
 		}
2033 2033
 
2034 2034
 		$parameters = array();
@@ -2165,7 +2165,7 @@  discard block
 block discarded – undo
2165 2165
 
2166 2166
 		$toprightmenu .= '</div>';
2167 2167
 
2168
-		$toprightmenu .= '</div>'."\n";		 // end div class="login_block_tools"
2168
+		$toprightmenu .= '</div>'."\n"; // end div class="login_block_tools"
2169 2169
 
2170 2170
 
2171 2171
 		// Add block for other tools
@@ -2186,7 +2186,7 @@  discard block
 block discarded – undo
2186 2186
 
2187 2187
 		// Link to module builder
2188 2188
 		if (isModEnabled('modulebuilder')) {
2189
-			$text = '<a href="' . dolBuildUrl(DOL_URL_ROOT . '/modulebuilder/index.php', ['mainmenu' => 'home', 'leftmenu' => 'admintools']) .'" target="modulebuilder">';
2189
+			$text = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/modulebuilder/index.php', ['mainmenu' => 'home', 'leftmenu' => 'admintools']).'" target="modulebuilder">';
2190 2190
 			//$text.= img_picto(":".$langs->trans("ModuleBuilder"), 'printer_top.png', 'class="printer"');
2191 2191
 			$text .= '<span class="fa fa-bug atoplogin valignmiddle"></span>';
2192 2192
 			$text .= '</a>';
@@ -2466,7 +2466,7 @@  discard block
 block discarded – undo
2466 2466
 	}
2467 2467
 
2468 2468
 	if (empty($urllogout)) {
2469
-		$urllogout = dolBuildUrl(DOL_URL_ROOT . '/user/logout.php', [], true);
2469
+		$urllogout = dolBuildUrl(DOL_URL_ROOT.'/user/logout.php', [], true);
2470 2470
 	}
2471 2471
 
2472 2472
 	// accesskey is for Windows or Linux:  ALT + key for chrome, ALT + SHIFT + KEY for firefox
@@ -2915,7 +2915,7 @@  discard block
 block discarded – undo
2915 2915
 		$langs->load(explode('@', $item['name'])[1]);
2916 2916
 		$dropDownQuickAddHtml .= '
2917 2917
 			<a class="dropdown-item quickadd-item" href="'.DOL_URL_ROOT.$item['url'].'" title="'.$langs->trans(explode('@', $item['title'])[0]).'">
2918
-			'. img_picto('', $item['picto'], 'style="width:18px;"') . ' ' . $langs->trans(explode('@', $item['name'])[0]) . '</a>
2918
+			'. img_picto('', $item['picto'], 'style="width:18px;"').' '.$langs->trans(explode('@', $item['name'])[0]).'</a>
2919 2919
 		';
2920 2920
 	}
2921 2921
 
@@ -3035,7 +3035,7 @@  discard block
 block discarded – undo
3035 3035
  */
3036 3036
 function top_menu_search()
3037 3037
 {
3038
-	global $langs, $conf, $db, $user, $hookmanager;	// used by htdocs/core/ajax/selectsearchbox.php
3038
+	global $langs, $conf, $db, $user, $hookmanager; // used by htdocs/core/ajax/selectsearchbox.php
3039 3039
 
3040 3040
 	$html = '';
3041 3041
 
@@ -3808,7 +3808,7 @@  discard block
 block discarded – undo
3808 3808
 		$forceping = GETPOST('forceping', 'alpha');
3809 3809
 		if (($_SERVER["PHP_SELF"] == DOL_URL_ROOT.'/index.php') || $forceping) {
3810 3810
 			//print '<!-- instance_unique_id='.$conf->file->instance_unique_id.' MAIN_FIRST_PING_OK_ID='.getDolGlobalString('MAIN_FIRST_PING_OK_ID').' -->';
3811
-			$hash_unique_id = dol_hash('dolibarr'.$conf->file->instance_unique_id, 'sha256');	// Note: if the global salt changes, this hash changes too so ping may be counted twice. We don't mind. It is for statistics purpose only.
3811
+			$hash_unique_id = dol_hash('dolibarr'.$conf->file->instance_unique_id, 'sha256'); // Note: if the global salt changes, this hash changes too so ping may be counted twice. We don't mind. It is for statistics purpose only.
3812 3812
 
3813 3813
 			if (!getDolGlobalString('MAIN_FIRST_PING_OK_DATE')
3814 3814
 				|| (!empty($conf->file->instance_unique_id) && ($hash_unique_id != getDolGlobalString('MAIN_FIRST_PING_OK_ID')) && (getDolGlobalString('MAIN_FIRST_PING_OK_ID') != 'disabled'))
Please login to merge, or discard this patch.
htdocs/comm/propal/class/propal.class.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
 			}
700 700
 			$txlocaltax1 = price2num($txlocaltax1);
701 701
 			$txlocaltax2 = price2num($txlocaltax2);
702
-			$pa_ht = price2num($pa_ht);  // do not convert to float here, it breaks the functioning of $pa_ht is empty string
702
+			$pa_ht = price2num($pa_ht); // do not convert to float here, it breaks the functioning of $pa_ht is empty string
703 703
 			if ($price_base_type == 'HT') {
704 704
 				$pu = $pu_ht;
705 705
 			} else {
@@ -941,7 +941,7 @@  discard block
 block discarded – undo
941 941
 		}
942 942
 		$txlocaltax1 = price2num($txlocaltax1);
943 943
 		$txlocaltax2 = price2num($txlocaltax2);
944
-		$pa_ht = price2num($pa_ht);  // do not convert to float here, it breaks the functioning of $pa_ht_isemptystring
944
+		$pa_ht = price2num($pa_ht); // do not convert to float here, it breaks the functioning of $pa_ht_isemptystring
945 945
 		if (empty($qty) && empty($special_code)) {
946 946
 			$special_code = 3; // Set option tag
947 947
 		}
@@ -1528,7 +1528,7 @@  discard block
 block discarded – undo
1528 1528
 			if ($objsoc->id > 0 && !empty($object->lines)) {
1529 1529
 				if ($update_prices === true && getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) {
1530 1530
 					// If price per customer
1531
-					require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php';
1531
+					require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php';
1532 1532
 				}
1533 1533
 
1534 1534
 				foreach ($object->lines as $line) {
@@ -1561,9 +1561,9 @@  discard block
 block discarded – undo
1561 1561
 											foreach ($prodcustprice->lines as $k => $custprice_line) {
1562 1562
 												if ($custprice_line->date_begin <= $date_now && (empty($custprice_line->date_end) || $date_now <= $custprice_line->date_end)) {
1563 1563
 													$pu_ht = price($custprice_line->price);
1564
-													$tva_tx = ($custprice_line->default_vat_code ? $custprice_line->tva_tx . ' (' . $custprice_line->default_vat_code . ' )' : $custprice_line->tva_tx);
1564
+													$tva_tx = ($custprice_line->default_vat_code ? $custprice_line->tva_tx.' ('.$custprice_line->default_vat_code.' )' : $custprice_line->tva_tx);
1565 1565
 													if ($custprice_line->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) {
1566
-														$tva_tx .= ' (' . $custprice_line->default_vat_code . ')';
1566
+														$tva_tx .= ' ('.$custprice_line->default_vat_code.')';
1567 1567
 													}
1568 1568
 													$remise_percent = $custprice_line->discount_percent;
1569 1569
 													break;
@@ -1729,7 +1729,7 @@  discard block
 block discarded – undo
1729 1729
 				$this->ref_customer         = $obj->ref_client;
1730 1730
 				$this->ref_ext              = $obj->ref_ext;
1731 1731
 
1732
-				$this->total                = $obj->total_ttc;			// TODO deprecated
1732
+				$this->total                = $obj->total_ttc; // TODO deprecated
1733 1733
 				$this->total_ttc            = $obj->total_ttc;
1734 1734
 				$this->total_ht             = $obj->total_ht;
1735 1735
 				$this->total_tva            = $obj->total_tva;
@@ -2655,7 +2655,7 @@  discard block
 block discarded – undo
2655 2655
 	 */
2656 2656
 	public function closeProposal($user, $status, $note_private = '', $notrigger = 0, $note_public = '')
2657 2657
 	{
2658
-		global $langs,$conf;
2658
+		global $langs, $conf;
2659 2659
 
2660 2660
 		$error = 0;
2661 2661
 		$now = dol_now();
@@ -2690,10 +2690,10 @@  discard block
 block discarded – undo
2690 2690
 		if ($resql) {
2691 2691
 			// Status self::STATUS_REFUSED by default
2692 2692
 			$modelpdf = getDolGlobalString('PROPALE_ADDON_PDF_ODT_CLOSED', $this->model_pdf);
2693
-			$triggerName = 'PROPAL_CLOSE_REFUSED';		// used later in call_trigger()
2693
+			$triggerName = 'PROPAL_CLOSE_REFUSED'; // used later in call_trigger()
2694 2694
 
2695 2695
 			if ($status == self::STATUS_SIGNED) {			// Status self::STATUS_SIGNED
2696
-				$triggerName = 'PROPAL_CLOSE_SIGNED';	// used later in call_trigger()
2696
+				$triggerName = 'PROPAL_CLOSE_SIGNED'; // used later in call_trigger()
2697 2697
 				$modelpdf = getDolGlobalString('PROPALE_ADDON_PDF_ODT_TOBILL', $this->model_pdf);
2698 2698
 
2699 2699
 				// The connected company is classified as a client
@@ -2727,7 +2727,7 @@  discard block
 block discarded – undo
2727 2727
 			}
2728 2728
 
2729 2729
 			$this->oldcopy = clone $this;
2730
-			$this->statut = $status;	// deprecated
2730
+			$this->statut = $status; // deprecated
2731 2731
 			$this->status = $status;
2732 2732
 			$this->date_signature = $date_signature;
2733 2733
 			$this->note_private = $newprivatenote;
@@ -2745,7 +2745,7 @@  discard block
 block discarded – undo
2745 2745
 				$this->db->commit();
2746 2746
 				return 1;
2747 2747
 			} else {
2748
-				$this->statut = $this->oldcopy->status;	// deprecated
2748
+				$this->statut = $this->oldcopy->status; // deprecated
2749 2749
 				$this->status = $this->oldcopy->status;
2750 2750
 				$this->date_signature = $this->oldcopy->date_signature;
2751 2751
 				$this->note_private = $this->oldcopy->note_private;
@@ -2859,10 +2859,10 @@  discard block
 block discarded – undo
2859 2859
 
2860 2860
 		$this->db->begin();
2861 2861
 
2862
-		$sql = "UPDATE ". MAIN_DB_PREFIX . $this->table_element;
2863
-		$sql .= " SET fk_statut = " . self::STATUS_CANCELED . ",";
2864
-		$sql .= " fk_user_modif = " . ((int) $user->id);
2865
-		$sql .= " WHERE rowid = " . ((int) $this->id);
2862
+		$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element;
2863
+		$sql .= " SET fk_statut = ".self::STATUS_CANCELED.",";
2864
+		$sql .= " fk_user_modif = ".((int) $user->id);
2865
+		$sql .= " WHERE rowid = ".((int) $this->id);
2866 2866
 
2867 2867
 		dol_syslog(get_class($this)."::cancel", LOG_DEBUG);
2868 2868
 		if ($this->db->query($sql)) {
@@ -2874,7 +2874,7 @@  discard block
 block discarded – undo
2874 2874
 			// End call triggers
2875 2875
 
2876 2876
 			if (!$error) {
2877
-				$this->statut = self::STATUS_CANCELED;	// deprecated
2877
+				$this->statut = self::STATUS_CANCELED; // deprecated
2878 2878
 				$this->status = self::STATUS_CANCELED;
2879 2879
 				$this->db->commit();
2880 2880
 				return 1;
@@ -2940,7 +2940,7 @@  discard block
 block discarded – undo
2940 2940
 		}
2941 2941
 
2942 2942
 		if (!$error) {
2943
-			$this->statut = self::STATUS_DRAFT;	// deprecated
2943
+			$this->statut = self::STATUS_DRAFT; // deprecated
2944 2944
 			$this->status = self::STATUS_DRAFT;
2945 2945
 
2946 2946
 			$this->db->commit();
@@ -3223,7 +3223,7 @@  discard block
 block discarded – undo
3223 3223
 					}
3224 3224
 				}
3225 3225
 				if (file_exists($dir)) {
3226
-					$res = @dol_delete_dir_recursive($dir);		// delete files physically + into ecm tables
3226
+					$res = @dol_delete_dir_recursive($dir); // delete files physically + into ecm tables
3227 3227
 					if (!$res) {
3228 3228
 						$this->error = 'ErrorFailToDeleteDir';
3229 3229
 						$this->errors[] = $this->error;
@@ -3630,7 +3630,7 @@  discard block
 block discarded – undo
3630 3630
 		$this->multicurrency_code = $conf->currency;
3631 3631
 
3632 3632
 		// Lines
3633
-		$nbp = min(1000, GETPOSTINT('nblines') ? GETPOSTINT('nblines') : 5);	// We can force the nb of lines to test from command line (but not more than 1000)
3633
+		$nbp = min(1000, GETPOSTINT('nblines') ? GETPOSTINT('nblines') : 5); // We can force the nb of lines to test from command line (but not more than 1000)
3634 3634
 		$xnbp = 0;
3635 3635
 		while ($xnbp < $nbp) {
3636 3636
 			$line = new PropaleLigne($this->db);
@@ -3879,13 +3879,13 @@  discard block
 block discarded – undo
3879 3879
 			parse_str($get_params, $query);
3880 3880
 			$query = array_merge($query, ['id' => $this->id]);
3881 3881
 			if ($option == '') {
3882
-				$baseurl = DOL_URL_ROOT . '/comm/propal/card.php';
3882
+				$baseurl = DOL_URL_ROOT.'/comm/propal/card.php';
3883 3883
 			} elseif ($option == 'compta') {  // deprecated
3884
-				$baseurl = DOL_URL_ROOT . '/comm/propal/card.php';
3884
+				$baseurl = DOL_URL_ROOT.'/comm/propal/card.php';
3885 3885
 			} elseif ($option == 'expedition') {
3886
-				$baseurl = DOL_URL_ROOT . '/expedition/propal.php';
3886
+				$baseurl = DOL_URL_ROOT.'/expedition/propal.php';
3887 3887
 			} elseif ($option == 'document') {
3888
-				$baseurl = DOL_URL_ROOT . '/comm/propal/document.php';
3888
+				$baseurl = DOL_URL_ROOT.'/comm/propal/document.php';
3889 3889
 			}
3890 3890
 
3891 3891
 			if ($option != 'nolink') {
@@ -3967,7 +3967,7 @@  discard block
 block discarded – undo
3967 3967
 		}
3968 3968
 
3969 3969
 		global $action;
3970
-		$hookmanager->initHooks(array($this->element . 'dao'));
3970
+		$hookmanager->initHooks(array($this->element.'dao'));
3971 3971
 		$parameters = array('id' => $this->id, 'getnomurl' => &$result);
3972 3972
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
3973 3973
 		if ($reshook > 0) {
@@ -4072,7 +4072,7 @@  discard block
 block discarded – undo
4072 4072
 		$return .= img_picto('', $this->picto);
4073 4073
 		$return .= '</div>';
4074 4074
 		$return .= '<div class="info-box-content">';
4075
-		$return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">' . $this->getNomUrl() . '</span>';
4075
+		$return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.$this->getNomUrl().'</span>';
4076 4076
 		if ($selected >= 0) {
4077 4077
 			$return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
4078 4078
 		}
Please login to merge, or discard this patch.
htdocs/core/lib/contact.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
 			} else {
83 83
 				dol_print_error($db);
84 84
 			}
85
-			dol_setcache($cachekey, $nbProject, 120);	// If setting cache fails, this is not a problem, so we do not test result.
85
+			dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result.
86 86
 		}
87 87
 		$head[$tab][0] = dolBuildUrl(DOL_URL_ROOT.'/contact/project.php', ['id' => $object->id]);
88 88
 		$head[$tab][1] = $langs->trans("Projects");
Please login to merge, or discard this patch.
htdocs/core/lib/usergroups.lib.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	$h = 0;
49 49
 	$head = array();
50 50
 
51
-	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/user/card.php', ['id' => $object->id]);
51
+	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/user/card.php', ['id' => $object->id]);
52 52
 	$head[$h][1] = $langs->trans("User");
53 53
 	$head[$h][2] = 'user';
54 54
 	$h++;
@@ -56,20 +56,20 @@  discard block
 block discarded – undo
56 56
 	if ((isModEnabled('ldap') && getDolGlobalString('LDAP_SYNCHRO_ACTIVE'))
57 57
 		&& (!getDolGlobalString('MAIN_DISABLE_LDAP_TAB') || !empty($user->admin))) {
58 58
 		$langs->load("ldap");
59
-		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/user/ldap.php', ['id' => $object->id]);
59
+		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/user/ldap.php', ['id' => $object->id]);
60 60
 		$head[$h][1] = $langs->trans("LDAPCard");
61 61
 		$head[$h][2] = 'ldap';
62 62
 		$h++;
63 63
 	}
64 64
 
65 65
 	if ($canreadperms) {
66
-		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/user/perms.php', ['id' => $object->id]);
66
+		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/user/perms.php', ['id' => $object->id]);
67 67
 		$head[$h][1] = $langs->trans("Rights").(!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') ? '<span class="badge marginleftonlyshort">'.($object->nb_rights).'</span>' : '');
68 68
 		$head[$h][2] = 'rights';
69 69
 		$h++;
70 70
 	}
71 71
 
72
-	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/user/param_ihm.php', ['id' => $object->id]);
72
+	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/user/param_ihm.php', ['id' => $object->id]);
73 73
 	$head[$h][1] = $langs->trans("UserGUISetup");
74 74
 	$head[$h][2] = 'guisetup';
75 75
 	$h++;
@@ -95,14 +95,14 @@  discard block
 block discarded – undo
95 95
 			}
96 96
 		}
97 97
 
98
-		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/user/agenda_extsites.php', ['id' => $object->id]);
98
+		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/user/agenda_extsites.php', ['id' => $object->id]);
99 99
 		$head[$h][1] = $langs->trans("ExtSites").($nbagenda ? '<span class="badge marginleftonlyshort">'.$nbagenda.'</span>' : '');
100 100
 		$head[$h][2] = 'extsites';
101 101
 		$h++;
102 102
 	}
103 103
 
104 104
 	if (isModEnabled('clicktodial')) {
105
-		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/user/clicktodial.php', ['id' => $object->id]);
105
+		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/user/clicktodial.php', ['id' => $object->id]);
106 106
 		$head[$h][1] = $langs->trans("ClickToDial");
107 107
 		$head[$h][2] = 'clicktodial';
108 108
 		$h++;
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 		}
133 133
 
134 134
 		$langs->load("mails");
135
-		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/user/notify/card.php', ['id' => $object->id]);
135
+		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/user/notify/card.php', ['id' => $object->id]);
136 136
 		$head[$h][1] = $langs->trans("NotificationsAuto");
137 137
 		if ($nbNote > 0) {
138 138
 			$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 		|| (isModEnabled('holiday') && $user->hasRight('holiday', 'read') && ($user->id == $object->id || $user->hasRight('holiday', 'readall')))
154 154
 	) {
155 155
 		// Bank
156
-		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/user/bank.php', ['id' => $object->id]);
156
+		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/user/bank.php', ['id' => $object->id]);
157 157
 		$head[$h][1] = $langs->trans("HRAndBank");
158 158
 		$head[$h][2] = 'bank';
159 159
 		$h++;
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 		if (!empty($object->note_private)) {
170 170
 			$nbNote++;
171 171
 		}
172
-		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/user/note.php', ['id' => $object->id]);
172
+		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/user/note.php', ['id' => $object->id]);
173 173
 		$head[$h][1] = $langs->trans("Note");
174 174
 		if ($nbNote > 0) {
175 175
 			$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 		$upload_dir = $conf->user->dir_output."/".$object->id;
184 184
 		$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
185 185
 		$nbLinks = Link::count($db, $object->element, $object->id);
186
-		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/user/document.php', ['userid' => $object->id]);
186
+		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/user/document.php', ['userid' => $object->id]);
187 187
 		$head[$h][1] = $langs->trans("Documents");
188 188
 		if (($nbFiles + $nbLinks) > 0) {
189 189
 			$head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>';
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 		$head[$h][2] = 'document';
192 192
 		$h++;
193 193
 
194
-		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/user/agenda.php', ['id' => $object->id]);
194
+		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/user/agenda.php', ['id' => $object->id]);
195 195
 		$head[$h][1] = $langs->trans("Events");
196 196
 		if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) {
197 197
 			$nbEvent = 0;
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 				} else {
214 214
 					dol_syslog('Failed to count actioncomm '.$db->lasterror(), LOG_ERR);
215 215
 				}
216
-				dol_setcache($cachekey, $nbEvent, 120);		// If setting cache fails, this is not a problem, so we do not test result.
216
+				dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result.
217 217
 			}
218 218
 
219 219
 			$head[$h][1] .= '/';
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 	$h = 0;
250 250
 	$head = array();
251 251
 
252
-	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/user/group/card.php', ['id' => $object->id]);
252
+	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/user/group/card.php', ['id' => $object->id]);
253 253
 	$head[$h][1] = $langs->trans("Card");
254 254
 	$head[$h][2] = 'group';
255 255
 	$h++;
@@ -257,14 +257,14 @@  discard block
 block discarded – undo
257 257
 	if ((isModEnabled('ldap') && getDolGlobalString('LDAP_SYNCHRO_ACTIVE'))
258 258
 		&& (!getDolGlobalString('MAIN_DISABLE_LDAP_TAB') || !empty($user->admin))) {
259 259
 		$langs->load("ldap");
260
-		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/user/group/ldap.php', ['id' => $object->id]);
260
+		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/user/group/ldap.php', ['id' => $object->id]);
261 261
 		$head[$h][1] = $langs->trans("LDAPCard");
262 262
 		$head[$h][2] = 'ldap';
263 263
 		$h++;
264 264
 	}
265 265
 
266 266
 	if ($canreadperms) {
267
-		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/user/group/perms.php', ['id' => $object->id]);
267
+		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/user/group/perms.php', ['id' => $object->id]);
268 268
 		$head[$h][1] = $langs->trans("GroupRights").'<span class="badge marginleftonlyshort">'.($object->nb_rights).'</span>';
269 269
 		$head[$h][2] = 'rights';
270 270
 		$h++;
@@ -298,17 +298,17 @@  discard block
 block discarded – undo
298 298
 	$h = 0;
299 299
 	$head = array();
300 300
 
301
-	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/admin/user.php');
301
+	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/admin/user.php');
302 302
 	$head[$h][1] = $langs->trans("Parameters");
303 303
 	$head[$h][2] = 'card';
304 304
 	$h++;
305 305
 
306
-	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/admin/usergroup.php');
306
+	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/admin/usergroup.php');
307 307
 	$head[$h][1] = $langs->trans("Group");
308 308
 	$head[$h][2] = 'usergroupcard';
309 309
 	$h++;
310 310
 
311
-	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/user/admin/user_extrafields.php');
311
+	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/user/admin/user_extrafields.php');
312 312
 	$head[$h][1] = $langs->trans("ExtraFields")." (".$langs->trans("Users").")";
313 313
 	$nbExtrafields = $extrafields->attributes['user']['count'];
314 314
 	if ($nbExtrafields > 0) {
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 	$head[$h][2] = 'attributes';
318 318
 	$h++;
319 319
 
320
-	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/user/admin/group_extrafields.php');
320
+	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/user/admin/group_extrafields.php');
321 321
 	$head[$h][1] = $langs->trans("ExtraFields")." (".$langs->trans("Groups").")";
322 322
 	$nbExtrafields = $extrafields->attributes['usergroup']['count'];
323 323
 	if ($nbExtrafields > 0) {
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
 
401 401
 		print '<tr class="oddeven">';
402 402
 		print '<td>'.$langs->trans("DefaultSkin").'</td>';
403
-		print '<td>' . getDolGlobalString('MAIN_THEME').'</td>';
403
+		print '<td>'.getDolGlobalString('MAIN_THEME').'</td>';
404 404
 		print '<td class="nowrap left"><input id="check_MAIN_THEME" name="check_MAIN_THEME"'.($edit ? '' : ' disabled').' type="checkbox" '.($selected_theme ? " checked" : "").'> <label for="check_MAIN_THEME">'.$langs->trans("UsePersonalValue").'</label></td>';
405 405
 		print '<td>&nbsp;</td>';
406 406
 		print '</tr>';
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
 						$file = $dirtheme."/".$subdir."/thumb.png";
456 456
 						$url = $urltheme."/".$subdir."/thumb.png";
457 457
 						if (!file_exists($file)) {
458
-							$url = dolBuildUrl(DOL_URL_ROOT . '/public/theme/common/nophoto.png');
458
+							$url = dolBuildUrl(DOL_URL_ROOT.'/public/theme/common/nophoto.png');
459 459
 						}
460 460
 						print '<a href="'.$_SERVER["PHP_SELF"].($edit ? '?action=edit&token='.newToken().'&mode=template&theme=' : '?theme=').$subdir.(GETPOST('optioncss', 'alpha', 1) ? '&optioncss='.GETPOST('optioncss', 'alpha', 1) : '').($fuser ? '&id='.$fuser->id : '').'" style="font-weight: normal;" alt="'.$langs->trans("Preview").'">';
461 461
 						if ($subdir == getDolGlobalString('MAIN_THEME')) {
Please login to merge, or discard this patch.
htdocs/core/lib/cron.lib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 		$pathtoscript = getDolGlobalString('MAIN_DOL_SCRIPTS_ROOT');
136 136
 	}
137 137
 
138
-	$file = $pathtoscript.'/scripts/cron/cron_run_jobs.php '.(!getDolGlobalString('CRON_KEY') ? 'securitykey' : '' . getDolGlobalString('CRON_KEY')).' '.$logintouse.' [cronjobid]';
138
+	$file = $pathtoscript.'/scripts/cron/cron_run_jobs.php '.(!getDolGlobalString('CRON_KEY') ? 'securitykey' : ''.getDolGlobalString('CRON_KEY')).' '.$logintouse.' [cronjobid]';
139 139
 	print '<textarea class="quatrevingtpercent">'.$file."</textarea><br>\n";
140 140
 	print '<br>';
141 141
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 		if ($linuxlike) {
153 153
 			print $langs->trans("CronExplainHowToRunUnix");
154 154
 			print '<br>';
155
-			print '<textarea class="quatrevingtpercent">*/5 * * * * '.$pathtoscript.'/scripts/cron/cron_run_jobs.php '.(!getDolGlobalString('CRON_KEY') ? 'securitykey' : '' . getDolGlobalString('CRON_KEY')).' '.$logintouse.' &gt; '.DOL_DATA_ROOT.'/cron_run_jobs.php.log</textarea><br>';
155
+			print '<textarea class="quatrevingtpercent">*/5 * * * * '.$pathtoscript.'/scripts/cron/cron_run_jobs.php '.(!getDolGlobalString('CRON_KEY') ? 'securitykey' : ''.getDolGlobalString('CRON_KEY')).' '.$logintouse.' &gt; '.DOL_DATA_ROOT.'/cron_run_jobs.php.log</textarea><br>';
156 156
 		} else {
157 157
 			print $langs->trans("CronExplainHowToRunWin");
158 158
 		}
Please login to merge, or discard this patch.
htdocs/core/lib/order.lib.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	$head = array();
47 47
 
48 48
 	if (isModEnabled('order') && $user->hasRight('commande', 'lire')) {
49
-		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/commande/card.php', ['id' => $object->id]);
49
+		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/commande/card.php', ['id' => $object->id]);
50 50
 		$head[$h][1] = $langs->trans("CustomerOrder");
51 51
 		$head[$h][2] = 'order';
52 52
 		$h++;
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
 	if (!getDolGlobalString('MAIN_DISABLE_CONTACTS_TAB')) {
56 56
 		$nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external'));
57
-		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/commande/contact.php', ['id' => $object->id]);
57
+		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/commande/contact.php', ['id' => $object->id]);
58 58
 		$head[$h][1] = $langs->trans('ContactsAddresses');
59 59
 		if ($nbContact > 0) {
60 60
 			$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbContact.'</span>';
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 		|| (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') && $user->hasRight('expedition', 'delivery', 'lire'))) {
68 68
 		$nbShipments = $object->getNbOfShipments();
69 69
 		$nbReceiption = 0;
70
-		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/expedition/shipment.php', ['id' => $object->id]);
70
+		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/expedition/shipment.php', ['id' => $object->id]);
71 71
 		$text = '';
72 72
 		if (getDolGlobalInt('MAIN_SUBMODULE_EXPEDITION')) {
73 73
 			$text .= $langs->trans("Shipments");
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 		if (!empty($object->note_public)) {
110 110
 			$nbNote++;
111 111
 		}
112
-		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/commande/note.php', ['id' => $object->id]);
112
+		$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/commande/note.php', ['id' => $object->id]);
113 113
 		$head[$h][1] = $langs->trans('Notes');
114 114
 		if ($nbNote > 0) {
115 115
 			$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 	$upload_dir = $conf->commande->multidir_output[$object->entity ?? $conf->entity]."/".dol_sanitizeFileName($object->ref);
124 124
 	$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
125 125
 	$nbLinks = Link::count($db, $object->element, $object->id);
126
-	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/commande/document.php', ['id' => $object->id]);
126
+	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/commande/document.php', ['id' => $object->id]);
127 127
 	$head[$h][1] = $langs->trans('Documents');
128 128
 	if (($nbFiles + $nbLinks) > 0) {
129 129
 		$head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>';
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	$h++;
133 133
 
134 134
 
135
-	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/commande/agenda.php', ['id' => $object->id]);
135
+	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/commande/agenda.php', ['id' => $object->id]);
136 136
 	$head[$h][1] = $langs->trans("Events");
137 137
 	if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) {
138 138
 		$nbEvent = 0;
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 			} else {
155 155
 				dol_syslog('Failed to count actioncomm '.$db->lasterror(), LOG_ERR);
156 156
 			}
157
-			dol_setcache($cachekey, $nbEvent, 120);		// If setting cache fails, this is not a problem, so we do not test result.
157
+			dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result.
158 158
 		}
159 159
 
160 160
 		$head[$h][1] .= '/';
@@ -189,19 +189,19 @@  discard block
 block discarded – undo
189 189
 	$h = 0;
190 190
 	$head = array();
191 191
 
192
-	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/admin/order.php');
192
+	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/admin/order.php');
193 193
 	$head[$h][1] = $langs->trans("Miscellaneous");
194 194
 	$head[$h][2] = 'general';
195 195
 	$h++;
196 196
 
197
-	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/admin/order_pdf.php');
197
+	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/admin/order_pdf.php');
198 198
 	$head[$h][1] = $langs->trans("PDF");
199 199
 	$head[$h][2] = 'pdf';
200 200
 	$h++;
201 201
 
202 202
 	complete_head_from_modules($conf, $langs, null, $head, $h, 'order_admin');
203 203
 
204
-	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/admin/order_extrafields.php');
204
+	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/admin/order_extrafields.php');
205 205
 	$head[$h][1] = $langs->trans("ExtraFields");
206 206
 	$nbExtrafields = $extrafields->attributes['commande']['count'];
207 207
 	if ($nbExtrafields > 0) {
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 	$head[$h][2] = 'attributes';
211 211
 	$h++;
212 212
 
213
-	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT . '/admin/orderdet_extrafields.php');
213
+	$head[$h][0] = dolBuildUrl(DOL_URL_ROOT.'/admin/orderdet_extrafields.php');
214 214
 	$head[$h][1] = $langs->trans("ExtraFieldsLines");
215 215
 	$nbExtrafields = $extrafields->attributes['commandedet']['count'];
216 216
 	if ($nbExtrafields > 0) {
Please login to merge, or discard this patch.