Completed
Branch develop (c23a95)
by
unknown
18:46
created
htdocs/core/class/utils.class.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -101,14 +101,14 @@  discard block
 block discarded – undo
101 101
 			if ($choice == 'allfiles') {
102 102
 				// Delete all files (except install.lock, do not follow symbolic links)
103 103
 				if ($dolibarr_main_data_root) {
104
-					$filesarray = dol_dir_list($dolibarr_main_data_root, "all", 0, '', 'install\.lock$', 'name', SORT_ASC, 0, 0, '', 1);	// No need to use recursive, we will delete directory
104
+					$filesarray = dol_dir_list($dolibarr_main_data_root, "all", 0, '', 'install\.lock$', 'name', SORT_ASC, 0, 0, '', 1); // No need to use recursive, we will delete directory
105 105
 				}
106 106
 			}
107 107
 
108 108
 			if ($choice == 'allfilesold') {
109 109
 				// Delete all files (except install.lock, do not follow symbolic links)
110 110
 				if ($dolibarr_main_data_root) {
111
-					$filesarray = dol_dir_list($dolibarr_main_data_root, "files", 1, '', 'install\.lock$', 'name', SORT_ASC, 0, 0, '', 1, $nbsecondsold);	// No need to use recursive, we will delete directory
111
+					$filesarray = dol_dir_list($dolibarr_main_data_root, "files", 1, '', 'install\.lock$', 'name', SORT_ASC, 0, 0, '', 1, $nbsecondsold); // No need to use recursive, we will delete directory
112 112
 				}
113 113
 			}
114 114
 
@@ -1303,14 +1303,14 @@  discard block
 block discarded – undo
1303 1303
 		}
1304 1304
 		if ($tmpfiles && is_array($tmpfiles)) {
1305 1305
 			foreach ($tmpfiles as $key => $val) {
1306
-				if ($key  == 'fullname') {
1306
+				if ($key == 'fullname') {
1307 1307
 					$filepath = array($val);
1308 1308
 					$filesize = dol_filesize($val);
1309 1309
 				}
1310
-				if ($key  == 'type') {
1310
+				if ($key == 'type') {
1311 1311
 					$mimetype = array($val);
1312 1312
 				}
1313
-				if ($key  == 'relativename') {
1313
+				if ($key == 'relativename') {
1314 1314
 					$filename = array($val);
1315 1315
 				}
1316 1316
 			}
@@ -1319,7 +1319,7 @@  discard block
 block discarded – undo
1319 1319
 		if ($filepath) {
1320 1320
 			if ($filesize > $sizelimit) {
1321 1321
 				$message .= '<br>'.$langs->trans("BackupIsTooLargeSend");
1322
-				$documenturl =  $dolibarr_main_url_root.'/document.php?modulepart=systemtools&atachement=1&file=backup/'.urlencode($filename[0]);
1322
+				$documenturl = $dolibarr_main_url_root.'/document.php?modulepart=systemtools&atachement=1&file=backup/'.urlencode($filename[0]);
1323 1323
 				$message .= '<br><a href='.$documenturl.'>Lien de téléchargement</a>';
1324 1324
 				$filepath = '';
1325 1325
 				$mimetype = '';
@@ -1331,7 +1331,7 @@  discard block
 block discarded – undo
1331 1331
 		}
1332 1332
 
1333 1333
 		if (!$error) {
1334
-			include_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
1334
+			include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
1335 1335
 			$mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, '', '', 0, -1);
1336 1336
 			if ($mailfile->error) {
1337 1337
 				$error++;
@@ -1390,7 +1390,7 @@  discard block
 block discarded – undo
1390 1390
 		}
1391 1391
 
1392 1392
 		$cron_job = new Cronjob($db);
1393
-		$cron_job->fetchAll('DESC', 't.rowid', 100, 0, 1, '', 1);	// Fetch jobs that are currently running
1393
+		$cron_job->fetchAll('DESC', 't.rowid', 100, 0, 1, '', 1); // Fetch jobs that are currently running
1394 1394
 
1395 1395
 		// Iterate over all jobs in processing (this can't be this job since his state is set to 0 before)
1396 1396
 		foreach ($cron_job->lines as $job_line) {
@@ -1408,7 +1408,7 @@  discard block
 block discarded – undo
1408 1408
 			}
1409 1409
 
1410 1410
 			// Calling posix_kill with the 0 kill signal will return true if the process is running, false otherwise.
1411
-			if (! posix_kill($job->pid, 0)) {
1411
+			if (!posix_kill($job->pid, 0)) {
1412 1412
 				// Clean processing and pid values
1413 1413
 				$job->processing = 0;
1414 1414
 				$job->pid = null;
Please login to merge, or discard this patch.
htdocs/hrm/class/skill.class.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	/**
109 109
 	 * @var array  Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
110 110
 	 */
111
-	public $fields=array(
111
+	public $fields = array(
112 112
 		'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
113 113
 		'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'cssview'=>'wordbreak', 'showoncombobox'=>'2',),
114 114
 		'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>3,),
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 	 */
228 228
 	public function create(User $user, $notrigger = false)
229 229
 	{
230
-		global $langs,$conf;
230
+		global $langs, $conf;
231 231
 
232 232
 		$resultcreate = $this->createCommon($user, $notrigger);
233 233
 
@@ -255,24 +255,24 @@  discard block
 block discarded – undo
255 255
 
256 256
 		$error = 0;
257 257
 
258
-		require_once __DIR__ . '/skilldet.class.php';
258
+		require_once __DIR__.'/skilldet.class.php';
259 259
 
260 260
 		$this->db->begin();
261 261
 
262 262
 		// Create level of skills
263
-		for ($i; $i <= $MaxNumberSkill ; $i++) {
263
+		for ($i; $i <= $MaxNumberSkill; $i++) {
264 264
 			$skilldet = new Skilldet($this->db);
265
-			$skilldet->description = $defaultSkillDesc . " " . $i;
265
+			$skilldet->description = $defaultSkillDesc." ".$i;
266 266
 			$skilldet->rankorder = $i;
267 267
 			$skilldet->fk_skill = $this->id;
268 268
 
269
-			$result =  $skilldet->create($user);
269
+			$result = $skilldet->create($user);
270 270
 			if ($result <= 0) {
271 271
 				$error++;
272 272
 			}
273 273
 		}
274 274
 
275
-		if (! $error) {
275
+		if (!$error) {
276 276
 			$this->db->commit();
277 277
 
278 278
 			setEventMessage($langs->trans('SkillCreated'), $i);
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
 	public function fetchLines()
407 407
 	{
408 408
 		$this->lines = array();
409
-		require_once __DIR__ . '/skilldet.class.php';
409
+		require_once __DIR__.'/skilldet.class.php';
410 410
 		$skilldet = new Skilldet($this->db);
411 411
 		$this->lines = $skilldet->fetchAll('ASC', '', '', '', array('fk_skill' => $this->id), '');
412 412
 
Please login to merge, or discard this patch.
htdocs/loan/class/paymentloan.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 		$sql .= " note_public=".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : "null").",";
346 346
 		$sql .= " fk_bank=".(isset($this->fk_bank) ? ((int) $this->fk_bank) : "null").",";
347 347
 		$sql .= " fk_user_creat=".(isset($this->fk_user_creat) ? ((int) $this->fk_user_creat) : "null").",";
348
-		$sql .= " fk_user_modif=".(isset($this->fk_user_modif) ?((int) $this->fk_user_modif) : "null");
348
+		$sql .= " fk_user_modif=".(isset($this->fk_user_modif) ? ((int) $this->fk_user_modif) : "null");
349 349
 		$sql .= " WHERE rowid=".((int) $this->id);
350 350
 
351 351
 		$this->db->begin();
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
 		$result .= $linkend;
656 656
 
657 657
 		global $action;
658
-		$hookmanager->initHooks(array($this->element . 'dao'));
658
+		$hookmanager->initHooks(array($this->element.'dao'));
659 659
 		$parameters = array('id'=>$this->id, 'getnomurl' => &$result);
660 660
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
661 661
 		if ($reshook > 0) {
Please login to merge, or discard this patch.
htdocs/core/modules/security/generate/modGeneratePassPerso.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 			return $pass;
195 195
 		}
196 196
 
197
-		return $this->getNewGeneratedPassword();	// warning, may generate infinite loop if conditions are not possible
197
+		return $this->getNewGeneratedPassword(); // warning, may generate infinite loop if conditions are not possible
198 198
 	}
199 199
 
200 200
 	/**
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 	{
209 209
 		global $langs;
210 210
 
211
-		$this->initAll();	// For the case this method is called alone
211
+		$this->initAll(); // For the case this method is called alone
212 212
 
213 213
 		$password_a = preg_split('//u', $password, null, PREG_SPLIT_NO_EMPTY);
214 214
 		$maj = preg_split('//u', $this->Maj, null, PREG_SPLIT_NO_EMPTY);
Please login to merge, or discard this patch.
htdocs/accountancy/class/accountancycategory.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
 		if (is_array($cpt)) {
628 628
 			$listofaccount = '';
629 629
 			foreach ($cpt as $cptcursor) {
630
-				if (! is_null($cptcursor)) {
630
+				if (!is_null($cptcursor)) {
631 631
 					if ($listofaccount) {
632 632
 						$listofaccount .= ",";
633 633
 					}
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
 
777 777
 		$sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position, c.category_type, c.sens";
778 778
 		$sql .= " FROM ".MAIN_DB_PREFIX."c_accounting_category as c";
779
-		$sql .= " WHERE c.active = " . (int) $active;
779
+		$sql .= " WHERE c.active = ".(int) $active;
780 780
 		$sql .= " AND c.entity = ".$conf->entity;
781 781
 		if ($categorytype >= 0) {
782 782
 			$sql .= " AND c.category_type = 1";
Please login to merge, or discard this patch.
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/mrp/tpl/linkedobjectblock.tpl.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -53,25 +53,25 @@  discard block
 block discarded – undo
53 53
 
54 54
 			$trclass = 'oddeven';
55 55
 
56
-			echo '<tr class="' . $trclass . '" >';
57
-			echo '<td class="linkedcol-element tdoverflowmax100">' . $langs->trans("ManufacturingOrder");
56
+			echo '<tr class="'.$trclass.'" >';
57
+			echo '<td class="linkedcol-element tdoverflowmax100">'.$langs->trans("ManufacturingOrder");
58 58
 			if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) {
59
-				print '<a class="objectlinked_importbtn" href="' . $objectlink->getNomUrl(0, '', 0, 1) . '&amp;action=selectlines" data-element="' . $objectlink->element . '" data-id="' . $objectlink->id . '"  > <i class="fa fa-indent"></i> </a';
59
+				print '<a class="objectlinked_importbtn" href="'.$objectlink->getNomUrl(0, '', 0, 1).'&amp;action=selectlines" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'"  > <i class="fa fa-indent"></i> </a';
60 60
 			}
61 61
 			echo '</td>';
62
-			echo '<td class="linkedcol-name nowraponall" >' . $objectlink->getNomUrl(1) . '</td>';
62
+			echo '<td class="linkedcol-name nowraponall" >'.$objectlink->getNomUrl(1).'</td>';
63 63
 
64 64
 			echo '<td class="linkedcol-ref center">';
65 65
 			//  $result = $product_static->fetch($objectlink->fk_product);
66 66
 			print '</td>';
67
-			echo '<td class="linkedcol-date center">' . dol_print_date($objectlink->date_creation, 'day') . '</td>';
67
+			echo '<td class="linkedcol-date center">'.dol_print_date($objectlink->date_creation, 'day').'</td>';
68 68
 			echo '<td class="linkedcol-amount right">-</td>';
69
-			echo '<td class="linkedcol-statut right">' . $objectlink->getLibStatut(3) . '</td>';
69
+			echo '<td class="linkedcol-statut right">'.$objectlink->getLibStatut(3).'</td>';
70 70
 			echo '<td class="linkedcol-action right">';
71 71
 
72 72
 			// we want to make the link via element_element for delete action
73
-			$sql = " Select rowid from " . MAIN_DB_PREFIX . "element_element";
74
-			$sql .= " WHERE  fk_source = " . (int) $object->id . " and fk_target = '" . dol_escape_htmltag($key) . "'";
73
+			$sql = " Select rowid from ".MAIN_DB_PREFIX."element_element";
74
+			$sql .= " WHERE  fk_source = ".(int) $object->id." and fk_target = '".dol_escape_htmltag($key)."'";
75 75
 
76 76
 			$resql = $db->query($sql);
77 77
 			$k = 0;
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 				$obj = $db->fetch_object($resql);
80 80
 				if ($obj->rowid && $obj->rowid > 0) $k = $obj->rowid;
81 81
 			}
82
-			echo '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=dellink&token=' . newToken() . '&dellinkid=' . $k . '">' . img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink') . '</a>';
82
+			echo '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&token='.newToken().'&dellinkid='.$k.'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'</a>';
83 83
 			echo '</td>';
84 84
 			echo "</tr>\n";
85 85
 		}
Please login to merge, or discard this patch.
htdocs/fourn/commande/list.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 $search_date_order_endday = GETPOST('search_date_order_endday', 'int');
65 65
 $search_date_order_endmonth = GETPOST('search_date_order_endmonth', 'int');
66 66
 $search_date_order_endyear = GETPOST('search_date_order_endyear', 'int');
67
-$search_date_order_start = dol_mktime(0, 0, 0, $search_date_order_startmonth, $search_date_order_startday, $search_date_order_startyear);	// Use tzserver
67
+$search_date_order_start = dol_mktime(0, 0, 0, $search_date_order_startmonth, $search_date_order_startday, $search_date_order_startyear); // Use tzserver
68 68
 $search_date_order_end = dol_mktime(23, 59, 59, $search_date_order_endmonth, $search_date_order_endday, $search_date_order_endyear);
69 69
 
70 70
 $search_date_delivery_startday = GETPOST('search_date_delivery_startday', 'int');
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 $search_date_delivery_endday = GETPOST('search_date_delivery_endday', 'int');
74 74
 $search_date_delivery_endmonth = GETPOST('search_date_delivery_endmonth', 'int');
75 75
 $search_date_delivery_endyear = GETPOST('search_date_delivery_endyear', 'int');
76
-$search_date_delivery_start = dol_mktime(0, 0, 0, $search_date_delivery_startmonth, $search_date_delivery_startday, $search_date_delivery_startyear);	// Use tzserver
76
+$search_date_delivery_start = dol_mktime(0, 0, 0, $search_date_delivery_startmonth, $search_date_delivery_startday, $search_date_delivery_startyear); // Use tzserver
77 77
 $search_date_delivery_end = dol_mktime(23, 59, 59, $search_date_delivery_endmonth, $search_date_delivery_endday, $search_date_delivery_endyear);
78 78
 
79 79
 $search_date_valid_startday = GETPOST('search_date_valid_startday', 'int');
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 $search_date_valid_endday = GETPOST('search_date_valid_endday', 'int');
83 83
 $search_date_valid_endmonth = GETPOST('search_date_valid_endmonth', 'int');
84 84
 $search_date_valid_endyear = GETPOST('search_date_valid_endyear', 'int');
85
-$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear);	// Use tzserver
85
+$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear); // Use tzserver
86 86
 $search_date_valid_end = dol_mktime(23, 59, 59, $search_date_valid_endmonth, $search_date_valid_endday, $search_date_valid_endyear);
87 87
 
88 88
 $search_date_approve_startday = GETPOST('search_date_approve_startday', 'int');
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 $search_date_approve_endday = GETPOST('search_date_approve_endday', 'int');
92 92
 $search_date_approve_endmonth = GETPOST('search_date_approve_endmonth', 'int');
93 93
 $search_date_approve_endyear = GETPOST('search_date_approve_endyear', 'int');
94
-$search_date_approve_start = dol_mktime(0, 0, 0, $search_date_approve_startmonth, $search_date_approve_startday, $search_date_approve_startyear);	// Use tzserver
94
+$search_date_approve_start = dol_mktime(0, 0, 0, $search_date_approve_startmonth, $search_date_approve_startday, $search_date_approve_startyear); // Use tzserver
95 95
 $search_date_approve_end = dol_mktime(23, 59, 59, $search_date_approve_endmonth, $search_date_approve_endday, $search_date_approve_endyear);
96 96
 
97 97
 $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
 
371 371
 		$db->begin();
372 372
 
373
-		$default_ref_supplier=dol_print_date(dol_now(), '%Y%m%d%H%M%S');
373
+		$default_ref_supplier = dol_print_date(dol_now(), '%Y%m%d%H%M%S');
374 374
 
375 375
 		foreach ($orders as $id_order) {
376 376
 			$cmd = new CommandeFournisseur($db);
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
 				$objecttmp->fk_project = $cmd->fk_project;
390 390
 				$objecttmp->multicurrency_code = $cmd->multicurrency_code;
391 391
 				$objecttmp->ref_supplier = !empty($cmd->ref_supplier) ? $cmd->ref_supplier : $default_ref_supplier;
392
-				$default_ref_supplier+=1;
392
+				$default_ref_supplier += 1;
393 393
 
394 394
 				$datefacture = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
395 395
 				if (empty($datefacture)) {
@@ -885,9 +885,9 @@  discard block
 block discarded – undo
885 885
 if ($search_user > 0) {
886 886
 	$sql .= " AND EXISTS (";
887 887
 	$sql .= " SELECT ec.rowid ";
888
-	$sql .= " FROM " . MAIN_DB_PREFIX . "element_contact as ec";
889
-	$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "c_type_contact as tc ON tc.rowid = ec.fk_c_type_contact";
890
-	$sql .= " WHERE ec.element_id = cf.rowid AND ec.fk_socpeople = " . ((int) $search_user);
888
+	$sql .= " FROM ".MAIN_DB_PREFIX."element_contact as ec";
889
+	$sql .= " INNER JOIN ".MAIN_DB_PREFIX."c_type_contact as tc ON tc.rowid = ec.fk_c_type_contact";
890
+	$sql .= " WHERE ec.element_id = cf.rowid AND ec.fk_socpeople = ".((int) $search_user);
891 891
 	$sql .= " AND tc.element = 'order_supplier' AND tc.source = 'internal'";
892 892
 	$sql .= ")";
893 893
 }
@@ -931,7 +931,7 @@  discard block
 block discarded – undo
931 931
 			if ($searchCategoryProductOperator == 0) {
932 932
 				$searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."commande_fournisseurdet as cd WHERE cd.fk_commande = cf.rowid AND cd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")";
933 933
 			} else {
934
-				$listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct);
934
+				$listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct);
935 935
 			}
936 936
 		}
937 937
 	}
@@ -1203,7 +1203,7 @@  discard block
 block discarded – undo
1203 1203
 
1204 1204
 	$topicmail = "SendOrderRef";
1205 1205
 	$modelmail = "order_supplier_send";
1206
-	$objecttmp = new CommandeFournisseur($db);	// in case $object is not the good object
1206
+	$objecttmp = new CommandeFournisseur($db); // in case $object is not the good object
1207 1207
 	$trackid = 'sord'.$object->id;
1208 1208
 	include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
1209 1209
 
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.