Completed
Branch develop (1d589f)
by
unknown
21:18
created
htdocs/core/modules/takepos/mod_takepos_ref_simple.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 */
77 77
 	public function getExample()
78 78
 	{
79
-		return $this->prefix.'0-0501-0001';		// TC0-0501-0001
79
+		return $this->prefix.'0-0501-0001'; // TC0-0501-0001
80 80
 	}
81 81
 
82 82
 	/**
@@ -92,10 +92,10 @@  discard block
 block discarded – undo
92 92
 		$pryymm = '';
93 93
 		$max = '';
94 94
 
95
-		$pos_source = 0;	// POS source = Terminal ID
95
+		$pos_source = 0; // POS source = Terminal ID
96 96
 
97 97
 		// First, we get the max value
98
-		$posindice = strlen($this->prefix.$pos_source.'-____-') + 1;	// So posindice is position after TCX-YYMM-
98
+		$posindice = strlen($this->prefix.$pos_source.'-____-') + 1; // So posindice is position after TCX-YYMM-
99 99
 
100 100
 		$sql  = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max";
101 101
 		$sql .= " FROM ".MAIN_DB_PREFIX."facture";
@@ -135,10 +135,10 @@  discard block
 block discarded – undo
135 135
 	{
136 136
 		global $db;
137 137
 
138
-		$pos_source = is_object($invoice) && $invoice->pos_source > 0 ? $invoice->pos_source : 0;	// POS source = Terminal ID
138
+		$pos_source = is_object($invoice) && $invoice->pos_source > 0 ? $invoice->pos_source : 0; // POS source = Terminal ID
139 139
 
140 140
 		// First, we get the max value
141
-		$posindice = strlen($this->prefix.$pos_source.'-____-') + 1;	// So posindice is position after TCX-YYMM-
141
+		$posindice = strlen($this->prefix.$pos_source.'-____-') + 1; // So posindice is position after TCX-YYMM-
142 142
 		$sql  = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; // This is standard SQL
143 143
 		$sql .= " FROM ".MAIN_DB_PREFIX."facture";
144 144
 		$sql .= " WHERE ref LIKE '".$db->escape($this->prefix.$pos_source."-____-%")."'";
Please login to merge, or discard this patch.
htdocs/societe/ajax/company.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
 	$match = preg_grep('/('.preg_quote($htmlname, '/').'[0-9]+)/', array_keys($_GET));
106 106
 	sort($match);
107 107
 
108
-	$id = (!empty($match[0]) ? $match[0] : '');		// Take first key found into GET array with matching $htmlname123
108
+	$id = (!empty($match[0]) ? $match[0] : ''); // Take first key found into GET array with matching $htmlname123
109 109
 
110 110
 	// When used from jQuery, the search term is added as GET param "term".
111 111
 	$searchkey = (($id && GETPOST($id, 'alpha')) ? GETPOST($id, 'alpha') : (($htmlname && GETPOST($htmlname, 'alpha')) ?GETPOST($htmlname, 'alpha') : ''));
Please login to merge, or discard this patch.
htdocs/hrm/lib/hrm_skillrank.lib.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -108,14 +108,14 @@  discard block
 block discarded – undo
108 108
 {
109 109
 	global $db, $conf, $langs;
110 110
 
111
-	require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php';
112
-	require_once DOL_DOCUMENT_ROOT . '/hrm/class/skilldet.class.php';
111
+	require_once DOL_DOCUMENT_ROOT.'/hrm/class/skill.class.php';
112
+	require_once DOL_DOCUMENT_ROOT.'/hrm/class/skilldet.class.php';
113 113
 
114 114
 	// On charge les différentes notes possibles pour la compétence $fk_skill
115 115
 	$skilldet = new Skilldet($db);
116 116
 	$Lines = $skilldet->fetchAll('ASC', 'rankorder', 0, 0, array('customsql'=>'fk_skill = '.$fk_skill));
117 117
 
118
-	if (!is_array($Lines) && $Lines<0) {
118
+	if (!is_array($Lines) && $Lines < 0) {
119 119
 		setEventMessages($skilldet->error, $skilldet->errors, 'errors');
120 120
 	}
121 121
 	if (empty($Lines)) return $langs->trans('SkillHasNoLines');
@@ -128,29 +128,29 @@  discard block
 block discarded – undo
128 128
 				continue;
129 129
 			}
130 130
 
131
-			$ret .= '<span title="' . $line->description . '" class="radio_js_bloc_number ' . $inputname . '_' . $line->fk_skill;
131
+			$ret .= '<span title="'.$line->description.'" class="radio_js_bloc_number '.$inputname.'_'.$line->fk_skill;
132 132
 			$ret .= $line->rankorder == $selected_rank ? ' selected' : '';
133
-			$ret .= '">' . $line->rankorder . '</span>';
133
+			$ret .= '">'.$line->rankorder.'</span>';
134 134
 		}
135 135
 
136 136
 		if ($mode == 'edit') {
137 137
 			$ret .= '
138
-		<input type="hidden" id="' . $inputname . '_' . $fk_skill . '" name="' . $inputname . '[' . $fk_skill . ']" value="' . $selected_rank . '">
138
+		<input type="hidden" id="' . $inputname.'_'.$fk_skill.'" name="'.$inputname.'['.$fk_skill.']" value="'.$selected_rank.'">
139 139
 		<script type="text/javascript">
140 140
 			$(document).ready(function(){
141 141
 				$(".radio_js_bloc_number").tooltip();
142 142
 				var error,same;
143
-				$(".' . $inputname . '_' . $fk_skill . '").on("click",function(){
143
+				$(".' . $inputname.'_'.$fk_skill.'").on("click",function(){
144 144
 					same=false;
145 145
 					val = $(this).html();
146 146
 					if($(this).hasClass("selected"))same=true;
147
-					$(".' . $inputname . '_' . $fk_skill . '").removeClass("selected");
147
+					$(".' . $inputname.'_'.$fk_skill.'").removeClass("selected");
148 148
 					if(same)
149 149
 					{
150
-						$("#' . $inputname . '_' . $fk_skill . '").val("");
150
+						$("#' . $inputname.'_'.$fk_skill.'").val("");
151 151
 					}else {
152 152
 						$(this).addClass("selected");
153
-						$("#' . $inputname . '_' . $fk_skill . '").val(val);
153
+						$("#' . $inputname.'_'.$fk_skill.'").val(val);
154 154
 					}
155 155
 				});
156 156
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,9 @@
 block discarded – undo
118 118
 	if (!is_array($Lines) && $Lines<0) {
119 119
 		setEventMessages($skilldet->error, $skilldet->errors, 'errors');
120 120
 	}
121
-	if (empty($Lines)) return $langs->trans('SkillHasNoLines');
121
+	if (empty($Lines)) {
122
+		return $langs->trans('SkillHasNoLines');
123
+	}
122 124
 
123 125
 	$ret = '<!-- field jquery --><span title="'.$langs->trans('NA').'" class="radio_js_bloc_number '.$inputname.'_'.$fk_skill.(empty($selected_rank) ? ' selected' : '').'">';
124 126
 	$ret .= $langs->trans('NA');
Please login to merge, or discard this patch.
htdocs/core/lib/admin.lib.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -240,7 +240,9 @@
 block discarded – undo
240 240
 				if (empty($nocommentremoval)) {
241 241
 					$buf = preg_replace('/([,;ERLT\)])\s*--.*$/i', '\1', $buf); //remove comment from a line that not start with -- before add it to the buffer
242 242
 				}
243
-				if ($buffer) $buffer .= ' ';
243
+				if ($buffer) {
244
+					$buffer .= ' ';
245
+				}
244 246
 				$buffer .= trim($buf);
245 247
 			}
246 248
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
 		if ($sql) {
329 329
 			// Test if th SQL is allowed SQL
330 330
 			if ($onlysqltoimportwebsite) {
331
-				$newsql = str_replace(array("\'"), '__BACKSLASHQUOTE__', $sql);	// Replace the \' char
331
+				$newsql = str_replace(array("\'"), '__BACKSLASHQUOTE__', $sql); // Replace the \' char
332 332
 
333 333
 				// Remove all strings contents including the ' so we can analyse SQL instruction only later
334 334
 				$l = strlen($newsql);
@@ -1067,7 +1067,7 @@  discard block
 block discarded – undo
1067 1067
 
1068 1068
 					if (preg_match('/dol_login/i', $sessValues) && // limit to dolibarr session
1069 1069
 					preg_match('/dol_entity\|s:([0-9]+):"('.$conf->entity.')"/i', $sessValues) && // limit to current entity
1070
-					preg_match('/dol_company\|s:([0-9]+):"(' . getDolGlobalString('MAIN_INFO_SOCIETE_NOM').')"/i', $sessValues)) { // limit to company name
1070
+					preg_match('/dol_company\|s:([0-9]+):"('.getDolGlobalString('MAIN_INFO_SOCIETE_NOM').')"/i', $sessValues)) { // limit to company name
1071 1071
 						$tmp = explode('_', $file);
1072 1072
 						$idsess = $tmp[1];
1073 1073
 						// We remove session if it's not ourself
@@ -1230,7 +1230,7 @@  discard block
 block discarded – undo
1230 1230
 
1231 1231
 	if (!count($ret['errors'])) {
1232 1232
 		$ret['nbmodules']++;
1233
-		$ret['nbperms'] += (is_array($objMod->rights)?count($objMod->rights):0);
1233
+		$ret['nbperms'] += (is_array($objMod->rights) ?count($objMod->rights) : 0);
1234 1234
 	}
1235 1235
 
1236 1236
 	return $ret;
@@ -1870,7 +1870,7 @@  discard block
 block discarded – undo
1870 1870
 	global $conf, $langs;
1871 1871
 
1872 1872
 	$text = $langs->trans("OnlyFollowingModulesAreOpenedToExternalUsers");
1873
-	$listofmodules = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);	// List of modules qualified for external user management
1873
+	$listofmodules = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); // List of modules qualified for external user management
1874 1874
 
1875 1875
 	$i = 0;
1876 1876
 	if (!empty($modules)) {
Please login to merge, or discard this patch.
htdocs/core/class/html.formactions.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -373,7 +373,7 @@
 block discarded – undo
373 373
 		$caction = new CActionComm($this->db);
374 374
 
375 375
 		// Suggest a list with manual events or all auto events
376
-		$arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot, '', 0);		// If we use param 'all' instead of 'code', there is no group by include in answer but the key 'type' of answer array contains the key for the group by.
376
+		$arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot, '', 0); // If we use param 'all' instead of 'code', there is no group by include in answer but the key 'type' of answer array contains the key for the group by.
377 377
 		if (empty($multiselect)) {
378 378
 			// Add empty line at start only if no multiselect
379 379
 			array_unshift($arraylist, '&nbsp;');
Please login to merge, or discard this patch.
htdocs/product/stats/bom.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 		//Calcul total qty and amount for global if full scan list
130 130
 		$total_qty_toconsume = 0;
131 131
 		$total_qty_toproduce = 0;
132
-		$product_cache=array();
132
+		$product_cache = array();
133 133
 		$bom_data_result = array();
134 134
 
135 135
 		//Qauntity  to produce
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 					}
180 180
 					$bomtmp->fk_product = $objp->fk_product;
181 181
 					$bom_data_result[$objp->rowid]['link'] = $bomtmp->getNomUrl(1, 'production');
182
-					$bom_data_result[$objp->rowid]['product'] = (array_key_exists($objp->fk_product, $product_cache)? $product_cache[$objp->fk_product]->getNomUrl(1): '');
182
+					$bom_data_result[$objp->rowid]['product'] = (array_key_exists($objp->fk_product, $product_cache) ? $product_cache[$objp->fk_product]->getNomUrl(1) : '');
183 183
 					$bom_data_result[$objp->rowid]['qty_toproduce'] += ($objp->qty_toproduce > 0 ? $objp->qty_toproduce : 0);
184 184
 					$bom_data_result[$objp->rowid]['qty_toconsume'] = 0;
185 185
 					$bom_data_result[$objp->rowid]['date_valid'] = dol_print_date($db->jdate($objp->date_valid), 'dayhour');
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 
243 243
 					if (!array_key_exists($objp->rowid, $bom_data_result)) {
244 244
 						$bom_data_result[$objp->rowid]['link'] = $bomtmp->getNomUrl(1, 'production');
245
-						$bom_data_result[$objp->rowid]['product'] = (array_key_exists($objp->fk_product, $product_cache)? $product_cache[$objp->fk_product]->getNomUrl(1): '');
245
+						$bom_data_result[$objp->rowid]['product'] = (array_key_exists($objp->fk_product, $product_cache) ? $product_cache[$objp->fk_product]->getNomUrl(1) : '');
246 246
 						$bom_data_result[$objp->rowid]['qty_toproduce'] = 0;
247 247
 						$bom_data_result[$objp->rowid]['qty_toconsume'] += ($objp->qty_toconsume > 0 ? $objp->qty_toconsume : 0);
248 248
 						$bom_data_result[$objp->rowid]['date_valid'] = dol_print_date($db->jdate($objp->date_valid), 'dayhour');
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
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 			} else {
81 81
 				dol_print_error($db);
82 82
 			}
83
-			dol_setcache($cachekey, $nbProject, 120);	// If setting cache fails, this is not a problem, so we do not test result.
83
+			dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result.
84 84
 		}
85 85
 		$head[$tab][0] = DOL_URL_ROOT.'/contact/project.php?id='.$object->id;
86 86
 		$head[$tab][1] = $langs->trans("Projects");
Please login to merge, or discard this patch.
htdocs/ticket/contact.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,9 @@
 block discarded – undo
61 61
 
62 62
 // Security check
63 63
 $id = GETPOST("id", 'int');
64
-if ($user->socid > 0) $socid = $user->socid;
64
+if ($user->socid > 0) {
65
+	$socid = $user->socid;
66
+}
65 67
 $result = restrictedArea($user, 'ticket', $object->id, '');
66 68
 
67 69
 // restrict access for externals users
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -88,21 +88,21 @@  discard block
 block discarded – undo
88 88
 		$error = 0;
89 89
 
90 90
 		$codecontact = dol_getIdFromCode($db, $typeid, 'c_type_contact', 'rowid', 'code');
91
-		if ($codecontact=='SUPPORTTEC') {
91
+		if ($codecontact == 'SUPPORTTEC') {
92 92
 			$internal_contacts = $object->listeContact(-1, 'internal', 0, 'SUPPORTTEC');
93 93
 			foreach ($internal_contacts as $key => $contact) {
94 94
 				if ($contact['id'] !== $contactid) {
95 95
 					//print "user à effacer : ".$useroriginassign;
96 96
 					$result = $object->delete_contact($contact['rowid']);
97
-					if ($result<0) {
98
-						$error ++;
97
+					if ($result < 0) {
98
+						$error++;
99 99
 						setEventMessages($object->error, $object->errors, 'errors');
100 100
 					}
101 101
 				}
102 102
 			}
103 103
 			$ret = $object->assignUser($user, $contactid);
104 104
 			if ($ret < 0) {
105
-				$error ++;
105
+				$error++;
106 106
 				setEventMessages($object->error, $object->errors, 'errors');
107 107
 			}
108 108
 		}
@@ -139,10 +139,10 @@  discard block
 block discarded – undo
139 139
 	if ($object->fetch($id, '', $track_id)) {
140 140
 		$internal_contacts = $object->listeContact(-1, 'internal', 0, 'SUPPORTTEC');
141 141
 		foreach ($internal_contacts as $key => $contact) {
142
-			if ($contact['rowid'] == $lineid && $object->fk_user_assign==$contact['id']) {
142
+			if ($contact['rowid'] == $lineid && $object->fk_user_assign == $contact['id']) {
143 143
 				$ret = $object->assignUser($user, null);
144 144
 				if ($ret < 0) {
145
-					$error ++;
145
+					$error++;
146 146
 					setEventMessages($object->error, $object->errors, 'errors');
147 147
 				}
148 148
 			}
Please login to merge, or discard this patch.
htdocs/ticket/card.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,9 @@
 block discarded – undo
115 115
 $url_page_current = DOL_URL_ROOT.'/ticket/card.php';
116 116
 
117 117
 // Security check - Protection if external user
118
-if ($user->socid > 0) $socid = $user->socid;
118
+if ($user->socid > 0) {
119
+	$socid = $user->socid;
120
+}
119 121
 $result = restrictedArea($user, 'ticket', $object->id);
120 122
 
121 123
 $triggermodname = 'TICKET_MODIFY';
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 				$object->ref = $getRef;
227 227
 			}
228 228
 
229
-			$object->fk_soc 					= $object->socid = GETPOST("socid", 'int') > 0 ? GETPOST("socid", 'int') : 0;
229
+			$object->fk_soc = $object->socid = GETPOST("socid", 'int') > 0 ? GETPOST("socid", 'int') : 0;
230 230
 			$object->subject 					= GETPOST("subject", 'alphanohtml');
231 231
 			$object->message 					= GETPOST("message", 'restricthtml');
232 232
 
@@ -237,20 +237,20 @@  discard block
 block discarded – undo
237 237
 			$object->severity_code 				= GETPOST("severity_code", 'alpha');
238 238
 			$object->severity_label 			= $langs->trans($langs->getLabelFromKey($db, $object->severity_code, 'c_ticket_severity', 'code', 'label'));
239 239
 			$object->fk_user_create 			= $user->id;
240
-			$object->email_from 				= $user->email;
241
-			$object->origin_email 				= null;
240
+			$object->email_from = $user->email;
241
+			$object->origin_email = null;
242 242
 
243
-			$notifyTiers 						= GETPOST("notify_tiers_at_create", 'alpha');
244
-			$object->notify_tiers_at_create 	= empty($notifyTiers) ? 0 : 1;
243
+			$notifyTiers = GETPOST("notify_tiers_at_create", 'alpha');
244
+			$object->notify_tiers_at_create = empty($notifyTiers) ? 0 : 1;
245 245
 
246 246
 			$fk_user_assign 				= GETPOST("fk_user_assign", 'int');
247 247
 			if ($fk_user_assign > 0) {
248
-				$object->fk_user_assign 	= $fk_user_assign;
248
+				$object->fk_user_assign = $fk_user_assign;
249 249
 				$object->status 			= $object::STATUS_ASSIGNED;
250 250
 			}
251 251
 
252
-			$object->fk_project 				= $projectid;
253
-			$object->fk_contract 				= GETPOST('fk_contract', 'int');
252
+			$object->fk_project = $projectid;
253
+			$object->fk_contract = GETPOST('fk_contract', 'int');
254 254
 
255 255
 
256 256
 			$id = $object->create($user);
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 
288 288
 				// Auto mark as read if created from backend
289 289
 				if (getDolGlobalString('TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND') && $user->hasRight('ticket', 'write')) {
290
-					if ( ! $object->markAsRead($user) > 0) {
290
+					if (!$object->markAsRead($user) > 0) {
291 291
 						setEventMessages($object->error, $object->errors, 'errors');
292 292
 					}
293 293
 				}
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 
302 302
 			if (!$error) {
303 303
 				// File transfer
304
-				$object->copyFilesForTicket('');		// trackid is forced to '' because files were uploaded when no id for ticket exists yet and trackid was ''
304
+				$object->copyFilesForTicket(''); // trackid is forced to '' because files were uploaded when no id for ticket exists yet and trackid was ''
305 305
 			}
306 306
 
307 307
 			if (!$error) {
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
 				foreach ($internal_contacts as $key => $contact) {
435 435
 					if ($contact['id'] !== $usertoassign) {
436 436
 						$result = $object->delete_contact($contact['rowid']);
437
-						if ($result<0) {
437
+						if ($result < 0) {
438 438
 							$error++;
439 439
 							setEventMessages($object->error, $object->errors, 'errors');
440 440
 						}
@@ -442,9 +442,9 @@  discard block
 block discarded – undo
442 442
 				}
443 443
 			}
444 444
 
445
-			if ($usertoassign > 0 && $usertoassign!==$useroriginassign) {
445
+			if ($usertoassign > 0 && $usertoassign !== $useroriginassign) {
446 446
 				$result = $object->add_contact($usertoassign, "SUPPORTTEC", 'internal', $notrigger = 0);
447
-				if ($result<0) {
447
+				if ($result < 0) {
448 448
 					$error++;
449 449
 					setEventMessages($object->error, $object->errors, 'errors');
450 450
 				}
@@ -738,7 +738,7 @@  discard block
 block discarded – undo
738 738
 
739 739
 	print load_fiche_titre($langs->trans('NewTicket'), '', 'ticket');
740 740
 
741
-	$formticket->trackid = '';		// TODO Use a unique key 'tic' to avoid conflict in upload file feature
741
+	$formticket->trackid = ''; // TODO Use a unique key 'tic' to avoid conflict in upload file feature
742 742
 	$formticket->withfromsocid = $socid ? $socid : $user->socid;
743 743
 	$formticket->withfromcontactid = $contactid ? $contactid : '';
744 744
 	$formticket->withtitletopic = 1;
@@ -805,7 +805,7 @@  discard block
 block discarded – undo
805 805
 
806 806
 	print '</form>'; */
807 807
 } elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'dellink' || $action == 'presend' || $action == 'presend_addmessage' || $action == 'close' || $action == 'abandon' || $action == 'delete' || $action == 'editcustomer' || $action == 'progression' || $action == 'categories' || $action == 'reopen'
808
-	|| $action== 'edit_contrat' || $action == 'editsubject' || $action == 'edit_extras' || $action == 'update_extras' || $action == 'edit_extrafields' || $action == 'set_extrafields' || $action == 'classify' || $action == 'sel_contract' || $action == 'edit_message_init' || $action == 'set_status' || $action == 'dellink') {
808
+	|| $action == 'edit_contrat' || $action == 'editsubject' || $action == 'edit_extras' || $action == 'update_extras' || $action == 'edit_extrafields' || $action == 'set_extrafields' || $action == 'classify' || $action == 'sel_contract' || $action == 'edit_message_init' || $action == 'set_status' || $action == 'dellink') {
809 809
 	if ($res > 0) {
810 810
 		// or for unauthorized internals users
811 811
 		if (!$user->socid && (getDolGlobalString('TICKET_LIMIT_VIEW_ASSIGNED_ONLY') && $object->fk_user_assign != $user->id) && !$user->hasRight('ticket', 'manage')) {
@@ -820,7 +820,7 @@  discard block
 block discarded – undo
820 820
 				'-3' => $langs->trans('TicketNotNotifyTiersAtClose')
821 821
 			);
822 822
 			foreach ($thirdparty_contacts as $thirdparty_contact) {
823
-				$contacts_select[$thirdparty_contact['id']] = $thirdparty_contact['civility'] . ' ' . $thirdparty_contact['lastname'] . ' ' . $thirdparty_contact['firstname'];
823
+				$contacts_select[$thirdparty_contact['id']] = $thirdparty_contact['civility'].' '.$thirdparty_contact['lastname'].' '.$thirdparty_contact['firstname'];
824 824
 			}
825 825
 
826 826
 			// Default select all or no contact
@@ -1013,8 +1013,8 @@  discard block
 block discarded – undo
1013 1013
 						$morehtmlref .= $formcontract->formSelectContract($_SERVER["PHP_SELF"].'?id='.$object->id, $object->socid, $object->fk_contract, 'contratid', 0, 1, 1, 1);
1014 1014
 					} else {
1015 1015
 						$morehtmlref .= '<a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=edit_contrat&token='.newToken().'&id='.$object->id.'">';
1016
-						$morehtmlref .=  img_edit($langs->trans('SetContract'));
1017
-						$morehtmlref .=  '</a>';
1016
+						$morehtmlref .= img_edit($langs->trans('SetContract'));
1017
+						$morehtmlref .= '</a>';
1018 1018
 					}
1019 1019
 				} else {
1020 1020
 					if (!empty($object->fk_contract)) {
@@ -1120,7 +1120,7 @@  discard block
 block discarded – undo
1120 1120
 			print '<input type="hidden" name="action" value="assign_user">';
1121 1121
 			print '<input type="hidden" name="track_id" value="'.$object->track_id.'">';
1122 1122
 			//print '<label for="fk_user_assign">'.$langs->trans("AssignUser").'</label> ';
1123
-			print $form->select_dolusers(empty($object->fk_user_assign)?$user->id:$object->fk_user_assign, 'fk_user_assign', 1);
1123
+			print $form->select_dolusers(empty($object->fk_user_assign) ? $user->id : $object->fk_user_assign, 'fk_user_assign', 1);
1124 1124
 			print ' <input type="submit" class="button small" name="btn_assign_user" value="'.$langs->trans("Validate").'" />';
1125 1125
 			print '</form>';
1126 1126
 		}
@@ -1458,10 +1458,10 @@  discard block
 block discarded – undo
1458 1458
 				// Link to create an intervention
1459 1459
 				// socid is needed otherwise fichinter ask it and forgot origin after form submit :\
1460 1460
 				if (!$object->fk_soc && $user->hasRight("ficheinter", "creer")) {
1461
-					print dolGetButtonAction($langs->trans('UnableToCreateInterIfNoSocid'), $langs->trans('TicketAddIntervention'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
1461
+					print dolGetButtonAction($langs->trans('UnableToCreateInterIfNoSocid'), $langs->trans('TicketAddIntervention'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
1462 1462
 				}
1463 1463
 				if ($object->fk_soc > 0 && isset($object->status) && $object->status < Ticket::STATUS_CLOSED && $user->hasRight('ficheinter', 'creer')) {
1464
-					print dolGetButtonAction('', $langs->trans('TicketAddIntervention'), 'default', DOL_URL_ROOT.'/fichinter/card.php?action=create&token='.newToken().'&socid='. $object->fk_soc.'&origin=ticket_ticket&originid='. $object->id, '');
1464
+					print dolGetButtonAction('', $langs->trans('TicketAddIntervention'), 'default', DOL_URL_ROOT.'/fichinter/card.php?action=create&token='.newToken().'&socid='.$object->fk_soc.'&origin=ticket_ticket&originid='.$object->id, '');
1465 1465
 				}
1466 1466
 
1467 1467
 				// Close ticket if status is read
Please login to merge, or discard this patch.