Completed
Branch develop (ac6154)
by
unknown
17:16
created
htdocs/website/class/websitepage.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	 */
57 57
 	public $fk_website;
58 58
 
59
-	public $fk_page;		// If translation of another page
59
+	public $fk_page; // If translation of another page
60 60
 
61 61
 	public $pageurl;
62 62
 	public $aliasalt;
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
 	 */
119 119
 	public $fk_object;
120 120
 
121
-	const STATUS_DRAFT = 0;			// offline
122
-	const STATUS_VALIDATED = 1;		// online
121
+	const STATUS_DRAFT = 0; // offline
122
+	const STATUS_VALIDATED = 1; // online
123 123
 
124 124
 
125 125
 	/**
Please login to merge, or discard this patch.
htdocs/core/lib/project.lib.php 2 patches
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2008,7 +2008,9 @@  discard block
 block discarded – undo
2008 2008
 				$modeinput = 'hours';
2009 2009
 				for ($idw = 0; $idw < 7; $idw++) {
2010 2010
 					$tmpday = dol_time_plus_duree($firstdaytoshow, $idw, 'd');
2011
-					if (!isset($totalforeachday[$tmpday])) $totalforeachday[$tmpday] = 0;
2011
+					if (!isset($totalforeachday[$tmpday])) {
2012
+						$totalforeachday[$tmpday] = 0;
2013
+					}
2012 2014
 					$cssonholiday = '';
2013 2015
 					if (!$isavailable[$tmpday]['morning'] && !$isavailable[$tmpday]['afternoon']) {
2014 2016
 						$cssonholiday .= 'onholidayallday ';
@@ -2307,7 +2309,9 @@  discard block
 block discarded – undo
2307 2309
 				$month = $firstdaytoshowarray['mon'];
2308 2310
 				foreach ($TWeek as $weekIndex => $weekNb) {
2309 2311
 					$weekWorkLoad = !empty($projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id]) ? $projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id] : 0 ;
2310
-					if (!isset($totalforeachweek[$weekNb])) $totalforeachweek[$weekNb] = 0;
2312
+					if (!isset($totalforeachweek[$weekNb])) {
2313
+						$totalforeachweek[$weekNb] = 0;
2314
+					}
2311 2315
 					$totalforeachweek[$weekNb] += $weekWorkLoad;
2312 2316
 
2313 2317
 					$alreadyspent = '';
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 		$nbContacts = $dataretrieved;
58 58
 	} else {
59 59
 		$nbContacts = count($project->liste_contact(-1, 'internal')) + count($project->liste_contact(-1, 'external'));
60
-		dol_setcache($cachekey, $nbContacts, 120);	// If setting cache fails, this is not a problem, so we do not test result.
60
+		dol_setcache($cachekey, $nbContacts, 120); // If setting cache fails, this is not a problem, so we do not test result.
61 61
 	}
62 62
 	$head[$h][0] = DOL_URL_ROOT.'/projet/contact.php?id='.((int) $project->id).($moreparam ? '&'.$moreparam : '');
63 63
 	$head[$h][1] = $langs->trans("ProjectContact");
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 			require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
82 82
 			$taskstatic = new Task($db);
83 83
 			$nbTasks = count($taskstatic->getTasksArray(0, 0, $project->id, 0, 0));
84
-			dol_setcache($cachekey, $nbTasks, 120);	// If setting cache fails, this is not a problem, so we do not test result.
84
+			dol_setcache($cachekey, $nbTasks, 120); // If setting cache fails, this is not a problem, so we do not test result.
85 85
 		}
86 86
 		$head[$h][0] = DOL_URL_ROOT.'/projet/tasks.php?id='.((int) $project->id).($moreparam ? '&'.$moreparam : '');
87 87
 		$head[$h][1] = $langs->trans("Tasks");
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 				$obj = $db->fetch_object($resql);
111 111
 				if ($obj) {
112 112
 					$nbTimeSpent = 1;
113
-					dol_setcache($cachekey, $nbTimeSpent, 120);	// If setting cache fails, this is not a problem, so we do not test result.
113
+					dol_setcache($cachekey, $nbTimeSpent, 120); // If setting cache fails, this is not a problem, so we do not test result.
114 114
 				}
115 115
 			} else {
116 116
 				dol_print_error($db);
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 			if (isModEnabled("banque")) {
201 201
 				$nbElements += $project->getElementCount('variouspayment', 'payment_various');
202 202
 			}
203
-			dol_setcache($cachekey, $nbElements, 120);	// If setting cache fails, this is not a problem, so we do not test result.
203
+			dol_setcache($cachekey, $nbElements, 120); // If setting cache fails, this is not a problem, so we do not test result.
204 204
 		}
205 205
 		$head[$h][0] = DOL_URL_ROOT.'/projet/element.php?id='.$project->id;
206 206
 		$head[$h][1] = $langs->trans("ProjectOverview");
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 
227 227
 	if (isModEnabled('eventorganization') && !empty($project->usage_organize_event)) {
228 228
 		$langs->load('eventorganization');
229
-		$head[$h][0] = DOL_URL_ROOT . '/eventorganization/conferenceorbooth_list.php?projectid=' . $project->id;
229
+		$head[$h][0] = DOL_URL_ROOT.'/eventorganization/conferenceorbooth_list.php?projectid='.$project->id;
230 230
 		$head[$h][1] = $langs->trans("EventOrganization");
231 231
 
232 232
 		// Enable caching of conf or booth count
@@ -238,15 +238,15 @@  discard block
 block discarded – undo
238 238
 			$nbConfOrBooth = $dataretrieved;
239 239
 		} else {
240 240
 			require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php';
241
-			$conforbooth=new ConferenceOrBooth($db);
241
+			$conforbooth = new ConferenceOrBooth($db);
242 242
 			$result = $conforbooth->fetchAll('', '', 0, 0, array('t.fk_project'=>$project->id));
243 243
 			//,
244
-			if (!is_array($result) && $result<0) {
244
+			if (!is_array($result) && $result < 0) {
245 245
 				setEventMessages($conforbooth->error, $conforbooth->errors, 'errors');
246 246
 			} else {
247 247
 				$nbConfOrBooth = count($result);
248 248
 			}
249
-			dol_setcache($cachekey, $nbConfOrBooth, 120);	// If setting cache fails, this is not a problem, so we do not test result.
249
+			dol_setcache($cachekey, $nbConfOrBooth, 120); // If setting cache fails, this is not a problem, so we do not test result.
250 250
 		}
251 251
 		$cachekey = 'count_attendees_'.$project->id;
252 252
 		$dataretrieved = dol_getcache($cachekey);
@@ -254,15 +254,15 @@  discard block
 block discarded – undo
254 254
 			$nbAttendees = $dataretrieved;
255 255
 		} else {
256 256
 			require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php';
257
-			$conforboothattendee=new ConferenceOrBoothAttendee($db);
257
+			$conforboothattendee = new ConferenceOrBoothAttendee($db);
258 258
 			$result = $conforboothattendee->fetchAll('', '', 0, 0, array('t.fk_project'=>$project->id));
259 259
 			//,
260
-			if (!is_array($result) && $result<0) {
260
+			if (!is_array($result) && $result < 0) {
261 261
 				setEventMessages($conforboothattendee->error, $conforboothattendee->errors, 'errors');
262 262
 			} else {
263 263
 				$nbAttendees = count($result);
264 264
 			}
265
-			dol_setcache($cachekey, $nbAttendees, 120);	// If setting cache fails, this is not a problem, so we do not test result.
265
+			dol_setcache($cachekey, $nbAttendees, 120); // If setting cache fails, this is not a problem, so we do not test result.
266 266
 		}
267 267
 		if ($nbConfOrBooth > 0 || $nbAttendees > 0) {
268 268
 			$head[$h][1] .= '<span class="badge marginleftonlyshort">';
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 		$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
317 317
 		$nbLinks = Link::count($db, $project->element, $project->id);
318 318
 		$totalAttached = $nbFiles + $nbLinks;
319
-		dol_setcache($cachekey, $totalAttached, 120);		// If setting cache fails, this is not a problem, so we do not test result.
319
+		dol_setcache($cachekey, $totalAttached, 120); // If setting cache fails, this is not a problem, so we do not test result.
320 320
 	}
321 321
 	$head[$h][0] = DOL_URL_ROOT.'/projet/document.php?id='.$project->id;
322 322
 	$head[$h][1] = $langs->trans('Documents');
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 			$nbComments = $dataretrieved;
338 338
 		} else {
339 339
 			$nbComments = $project->getNbComments();
340
-			dol_setcache($cachekey, $nbComments, 120);		// If setting cache fails, this is not a problem, so we do not test result.
340
+			dol_setcache($cachekey, $nbComments, 120); // If setting cache fails, this is not a problem, so we do not test result.
341 341
 		}
342 342
 		$head[$h][0] = DOL_URL_ROOT.'/projet/comment.php?id='.$project->id;
343 343
 		$head[$h][1] = $langs->trans("CommentLink");
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
 					if (in_array($lines[$i]->id, $arrayofselected)) {
699 699
 						$selected = 1;
700 700
 					}
701
-					print '<input id="cb' . $lines[$i]->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $lines[$i]->id . '"' . ($selected ? ' checked="checked"' : '') . '>';
701
+					print '<input id="cb'.$lines[$i]->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$lines[$i]->id.'"'.($selected ? ' checked="checked"' : '').'>';
702 702
 					print '</td>';
703 703
 				}
704 704
 
@@ -949,7 +949,7 @@  discard block
 block discarded – undo
949 949
 					if (in_array($lines[$i]->id, $arrayofselected)) {
950 950
 						$selected = 1;
951 951
 					}
952
-					print '<input id="cb' . $lines[$i]->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $lines[$i]->id . '"' . ($selected ? ' checked="checked"' : '') . '>';
952
+					print '<input id="cb'.$lines[$i]->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$lines[$i]->id.'"'.($selected ? ' checked="checked"' : '').'>';
953 953
 
954 954
 					print '</td>';
955 955
 				}
@@ -2089,7 +2089,7 @@  discard block
 block discarded – undo
2089 2089
 
2090 2090
 					$disabledtaskday = $disabledtask;
2091 2091
 
2092
-					if (! $disabledtask && $restrictBefore && $tmpday < $restrictBefore) {
2092
+					if (!$disabledtask && $restrictBefore && $tmpday < $restrictBefore) {
2093 2093
 						$disabledtaskday = 1;
2094 2094
 					}
2095 2095
 
@@ -2359,7 +2359,7 @@  discard block
 block discarded – undo
2359 2359
 				$year = $firstdaytoshowarray['year'];
2360 2360
 				$month = $firstdaytoshowarray['mon'];
2361 2361
 				foreach ($TWeek as $weekIndex => $weekNb) {
2362
-					$weekWorkLoad = !empty($projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id]) ? $projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id] : 0 ;
2362
+					$weekWorkLoad = !empty($projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id]) ? $projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id] : 0;
2363 2363
 					if (!isset($totalforeachweek[$weekNb])) $totalforeachweek[$weekNb] = 0;
2364 2364
 					$totalforeachweek[$weekNb] += $weekWorkLoad;
2365 2365
 
@@ -2372,7 +2372,7 @@  discard block
 block discarded – undo
2372 2372
 					$disabledtaskweek = $disabledtask;
2373 2373
 					$firstdayofweek = dol_mktime(0, 0, 0, $month, $TFirstDay[$weekIndex], $year);
2374 2374
 
2375
-					if (! $disabledtask && $restrictBefore && $firstdayofweek < $restrictBefore) {
2375
+					if (!$disabledtask && $restrictBefore && $firstdayofweek < $restrictBefore) {
2376 2376
 						$disabledtaskweek = 1;
2377 2377
 					}
2378 2378
 
Please login to merge, or discard this patch.
htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 		$maxfilesizearray = getMaxFileSizeArray();
180 180
 		$maxmin = $maxfilesizearray['maxmin'];
181 181
 		if ($maxmin > 0) {
182
-			$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
182
+			$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
183 183
 		}
184 184
 		$texte .= ' <input type="file" name="uploadfile">';
185 185
 		$texte .= '<input type="hidden" value="RECEPTION_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 				$newfiletmp = preg_replace('/\.od[ts]/i', '', $newfile);
274 274
 				$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
275 275
 				$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
276
-				$newfiletmp = $objectref . '_' . $newfiletmp;
276
+				$newfiletmp = $objectref.'_'.$newfiletmp;
277 277
 				//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
278 278
 				// Get extension (ods or odt)
279 279
 				$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
@@ -282,11 +282,11 @@  discard block
 block discarded – undo
282 282
 					if ($format == '1') {
283 283
 						$format = '%Y%m%d%H%M%S';
284 284
 					}
285
-					$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
285
+					$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
286 286
 				} else {
287
-					$filename = $newfiletmp . '.' . $newfileformat;
287
+					$filename = $newfiletmp.'.'.$newfileformat;
288 288
 				}
289
-				$file = $dir . '/' . $filename;
289
+				$file = $dir.'/'.$filename;
290 290
 				//print "newdir=".$dir;
291 291
 				//print "newfile=".$newfile;
292 292
 				//print "file=".$file;
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 				dol_mkdir($conf->reception->dir_temp);
296 296
 				if (!is_writable($conf->reception->dir_temp)) {
297 297
 					$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->reception->dir_temp);
298
-					dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
298
+					dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
299 299
 					return -1;
300 300
 				}
301 301
 
Please login to merge, or discard this patch.
htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 		$maxfilesizearray = getMaxFileSizeArray();
187 187
 		$maxmin = $maxfilesizearray['maxmin'];
188 188
 		if ($maxmin > 0) {
189
-			$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
189
+			$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
190 190
 		}
191 191
 		$texte .= ' <input type="file" name="uploadfile">';
192 192
 		$texte .= '<input type="hidden" value="EXPEDITION_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 				$newfiletmp = preg_replace('/\.od[ts]/i', '', $newfile);
281 281
 				$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
282 282
 				$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
283
-				$newfiletmp = $objectref . '_' . $newfiletmp;
283
+				$newfiletmp = $objectref.'_'.$newfiletmp;
284 284
 				//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
285 285
 				// Get extension (ods or odt)
286 286
 				$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
@@ -289,11 +289,11 @@  discard block
 block discarded – undo
289 289
 					if ($format == '1') {
290 290
 						$format = '%Y%m%d%H%M%S';
291 291
 					}
292
-					$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
292
+					$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
293 293
 				} else {
294
-					$filename = $newfiletmp . '.' . $newfileformat;
294
+					$filename = $newfiletmp.'.'.$newfileformat;
295 295
 				}
296
-				$file = $dir . '/' . $filename;
296
+				$file = $dir.'/'.$filename;
297 297
 				//print "newdir=".$dir;
298 298
 				//print "newfile=".$newfile;
299 299
 				//print "file=".$file;
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 				dol_mkdir($conf->expedition->dir_temp);
303 303
 				if (!is_writable($conf->expedition->dir_temp)) {
304 304
 					$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->expedition->dir_temp);
305
-					dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
305
+					dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
306 306
 					return -1;
307 307
 				}
308 308
 
Please login to merge, or discard this patch.
htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 		$maxfilesizearray = getMaxFileSizeArray();
181 181
 		$maxmin = $maxfilesizearray['maxmin'];
182 182
 		if ($maxmin > 0) {
183
-			$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
183
+			$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
184 184
 		}
185 185
 		$texte .= ' <input type="file" name="uploadfile">';
186 186
 		$texte .= '<input type="hidden" value="BOM_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
 				$newfiletmp = preg_replace('/\.od[ts]/i', '', $newfile);
277 277
 				$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
278 278
 				$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
279
-				$newfiletmp = $objectref . '_' . $newfiletmp;
279
+				$newfiletmp = $objectref.'_'.$newfiletmp;
280 280
 				//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
281 281
 				// Get extension (ods or odt)
282 282
 				$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
@@ -285,11 +285,11 @@  discard block
 block discarded – undo
285 285
 					if ($format == '1') {
286 286
 						$format = '%Y%m%d%H%M%S';
287 287
 					}
288
-					$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
288
+					$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
289 289
 				} else {
290
-					$filename = $newfiletmp . '.' . $newfileformat;
290
+					$filename = $newfiletmp.'.'.$newfileformat;
291 291
 				}
292
-				$file = $dir . '/' . $filename;
292
+				$file = $dir.'/'.$filename;
293 293
 				//print "newdir=".$dir;
294 294
 				//print "newfile=".$newfile;
295 295
 				//print "file=".$file;
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 				dol_mkdir($conf->bom->dir_temp);
299 299
 				if (!is_writable($conf->bom->dir_temp)) {
300 300
 					$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->bom->dir_temp);
301
-					dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
301
+					dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
302 302
 					return -1;
303 303
 				}
304 304
 
Please login to merge, or discard this patch.
htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 				$newfiletmp = preg_replace('/\.od[ts]/i', '', $newfile);
270 270
 				$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
271 271
 				$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
272
-				$newfiletmp = $objectref . '_' . $newfiletmp;
272
+				$newfiletmp = $objectref.'_'.$newfiletmp;
273 273
 				//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
274 274
 				// Get extension (ods or odt)
275 275
 				$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
@@ -278,11 +278,11 @@  discard block
 block discarded – undo
278 278
 					if ($format == '1') {
279 279
 						$format = '%Y%m%d%H%M%S';
280 280
 					}
281
-					$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
281
+					$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
282 282
 				} else {
283
-					$filename = $newfiletmp . '.' . $newfileformat;
283
+					$filename = $newfiletmp.'.'.$newfileformat;
284 284
 				}
285
-				$file = $dir . '/' . $filename;
285
+				$file = $dir.'/'.$filename;
286 286
 				//print "newdir=".$dir;
287 287
 				//print "newfile=".$newfile;
288 288
 				//print "file=".$file;
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 				dol_mkdir($conf->mrp->dir_temp);
292 292
 				if (!is_writable($conf->mrp->dir_temp)) {
293 293
 					$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->mrp->dir_temp);
294
-					dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
294
+					dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
295 295
 					return -1;
296 296
 				}
297 297
 
Please login to merge, or discard this patch.
htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 		$maxfilesizearray = getMaxFileSizeArray();
188 188
 		$maxmin = $maxfilesizearray['maxmin'];
189 189
 		if ($maxmin > 0) {
190
-			$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
190
+			$texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
191 191
 		}
192 192
 		$texte .= ' <input type="file" name="uploadfile">';
193 193
 		$texte .= '<input type="hidden" value="COMMANDE_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 				$newfiletmp = preg_replace('/\.od[ts]/i', '', $newfile);
283 283
 				$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
284 284
 				$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
285
-				$newfiletmp = $objectref . '_' . $newfiletmp;
285
+				$newfiletmp = $objectref.'_'.$newfiletmp;
286 286
 
287 287
 				// Get extension (ods or odt)
288 288
 				$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
@@ -291,11 +291,11 @@  discard block
 block discarded – undo
291 291
 					if ($format == '1') {
292 292
 						$format = '%Y%m%d%H%M%S';
293 293
 					}
294
-					$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
294
+					$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
295 295
 				} else {
296
-					$filename = $newfiletmp . '.' . $newfileformat;
296
+					$filename = $newfiletmp.'.'.$newfileformat;
297 297
 				}
298
-				$file = $dir . '/' . $filename;
298
+				$file = $dir.'/'.$filename;
299 299
 				//print "newdir=".$dir;
300 300
 				//print "newfile=".$newfile;
301 301
 				//print "file=".$file;
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
 				dol_mkdir($conf->commande->dir_temp);
305 305
 				if (!is_writable($conf->commande->dir_temp)) {
306 306
 					$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->commande->dir_temp);
307
-					dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
307
+					dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
308 308
 					return -1;
309 309
 				}
310 310
 
Please login to merge, or discard this patch.
core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 				$newfiletmp = preg_replace('/\.od[ts]/i', '', $newfile);
265 265
 				$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
266 266
 				$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
267
-				$newfiletmp = $objectref . '_' . $newfiletmp;
267
+				$newfiletmp = $objectref.'_'.$newfiletmp;
268 268
 				//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
269 269
 				// Get extension (ods or odt)
270 270
 				$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
@@ -273,11 +273,11 @@  discard block
 block discarded – undo
273 273
 					if ($format == '1') {
274 274
 						$format = '%Y%m%d%H%M%S';
275 275
 					}
276
-					$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
276
+					$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
277 277
 				} else {
278
-					$filename = $newfiletmp . '.' . $newfileformat;
278
+					$filename = $newfiletmp.'.'.$newfileformat;
279 279
 				}
280
-				$file = $dir . '/' . $filename;
280
+				$file = $dir.'/'.$filename;
281 281
 				//print "newdir=".$dir;
282 282
 				//print "newfile=".$newfile;
283 283
 				//print "file=".$file;
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 				dol_mkdir($conf->fournisseur->commande->dir_temp);
287 287
 				if (!is_writable($conf->fournisseur->commande->dir_temp)) {
288 288
 					$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->fournisseur->commande->dir_temp);
289
-					dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
289
+					dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
290 290
 					return -1;
291 291
 				}
292 292
 
Please login to merge, or discard this patch.
htdocs/hrm/class/job.class.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -609,7 +609,9 @@
 block discarded – undo
609 609
 	{
610 610
 		$Tab = $this->getForUser($fk_user);
611 611
 
612
-		if (empty($Tab)) return '';
612
+		if (empty($Tab)) {
613
+			return '';
614
+		}
613 615
 
614 616
 		$lastpos = array_shift($Tab);
615 617
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -102,13 +102,13 @@  discard block
 block discarded – undo
102 102
 	/**
103 103
 	 * @var array  Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
104 104
 	 */
105
-	public $fields=array(
105
+	public $fields = array(
106 106
 		'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
107 107
 		'label' => array('type'=>'varchar(128)', 'label'=>'Label', 'enabled'=>'1', 'position'=>20, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Label of object"),
108 108
 		'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>21, 'notnull'=>0, 'visible'=>1,),
109 109
 		'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>2,),
110 110
 		'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>2,),
111
-		'deplacement' => array('type'=>'select', 'required'=> 1,'label'=> 'NeedBusinessTravels', 'enabled'=> 1, 'position'=> 90, 'notnull'=> 1, 'visible'=> 1, 'arrayofkeyval'=> array(0 =>"No", 1=>"Yes"), 'default'=>0),
111
+		'deplacement' => array('type'=>'select', 'required'=> 1, 'label'=> 'NeedBusinessTravels', 'enabled'=> 1, 'position'=> 90, 'notnull'=> 1, 'visible'=> 1, 'arrayofkeyval'=> array(0 =>"No", 1=>"Yes"), 'default'=>0),
112 112
 		'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>70, 'notnull'=>0, 'visible'=>0,),
113 113
 		'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>71, 'notnull'=>0, 'visible'=>0,),
114 114
 		'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',),
@@ -845,7 +845,7 @@  discard block
 block discarded – undo
845 845
 	public function LibStatut($status, $mode = 0)
846 846
 	{
847 847
 		// phpcs:enable
848
-		return '';		// There is no status on job profile for the moment
848
+		return ''; // There is no status on job profile for the moment
849 849
 
850 850
 		/*
851 851
 		if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
@@ -953,7 +953,7 @@  discard block
 block discarded – undo
953 953
 		if (!empty($conf->global->hrm_JOB_ADDON)) {
954 954
 			$mybool = false;
955 955
 
956
-			$file = getDolGlobalString('hrm_JOB_ADDON') . ".php";
956
+			$file = getDolGlobalString('hrm_JOB_ADDON').".php";
957 957
 			$classname = $conf->global->hrm_JOB_ADDON;
958 958
 
959 959
 			// Include file with class
Please login to merge, or discard this patch.