Completed
Branch develop (fbba2b)
by
unknown
23:35
created
htdocs/categories/viewcat.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1126,7 +1126,7 @@
 block discarded – undo
1126 1126
 			if ($showclassifyform) {
1127 1127
 				print '<table class="noborder centpercent">';
1128 1128
 				print '<tr class="liste_titre"><td>';
1129
-				$force_entity = getEntity($object->element);	// So we will get same filter than the getObjectsInCateg()
1129
+				$force_entity = getEntity($object->element); // So we will get same filter than the getObjectsInCateg()
1130 1130
 				print img_picto('', $type, 'class="pictofixedwidth"');
1131 1131
 				print $form->select_dolusers('', 'elemid', 1, null, 0, '', '', $force_entity);
1132 1132
 				print '<input type="submit" class="button buttongen" name="addintocategory" value="'.$langs->trans("ClassifyInCategory").'"></td>';
Please login to merge, or discard this patch.
htdocs/categories/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -221,12 +221,12 @@
 block discarded – undo
221 221
 	$entry .= '</td>';
222 222
 	$entry .= '<td class="right" width="30px;">';
223 223
 	if ($user->hasRight('categorie', 'creer')) {
224
-		$entry .= '<a class="editfielda" href="' . DOL_URL_ROOT . '/categories/edit.php?id=' . $val['id'] . '&type=' . urlencode($type) . $moreparam . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?type=' . urlencode($type)) . '">' . img_edit() . '</a>';
224
+		$entry .= '<a class="editfielda" href="'.DOL_URL_ROOT.'/categories/edit.php?id='.$val['id'].'&type='.urlencode($type).$moreparam.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.urlencode($type)).'">'.img_edit().'</a>';
225 225
 	}
226 226
 	$entry .= '</td>';
227 227
 	$entry .= '<td class="right" width="30px;">';
228 228
 	if ($user->hasRight('categorie', 'supprimer')) {
229
-		$entry .= '<a class="deletefilelink" href="' . DOL_URL_ROOT . '/categories/viewcat.php?action=delete&token=' . newToken() . '&id=' . $val['id'] . '&type=' . urlencode($type) . $moreparam . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?type=' . urlencode($type) . $moreparam) . '&backtolist=' . urlencode($_SERVER["PHP_SELF"] . '?type=' . urlencode($type) . $moreparam) . '">' . img_delete() . '</a>';
229
+		$entry .= '<a class="deletefilelink" href="'.DOL_URL_ROOT.'/categories/viewcat.php?action=delete&token='.newToken().'&id='.$val['id'].'&type='.urlencode($type).$moreparam.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.urlencode($type).$moreparam).'&backtolist='.urlencode($_SERVER["PHP_SELF"].'?type='.urlencode($type).$moreparam).'">'.img_delete().'</a>';
230 230
 	}
231 231
 	$entry .= '</td>';
232 232
 
Please login to merge, or discard this patch.
htdocs/website/class/website.class.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1163,8 +1163,8 @@  discard block
 block discarded – undo
1163 1163
 			$stringtoexport = str_replace('file=js/'.$website->ref.'/', "file=js/__WEBSITE_KEY__/", $stringtoexport);
1164 1164
 			$stringtoexport = str_replace('medias/image/'.$website->ref.'/', "medias/image/__WEBSITE_KEY__/", $stringtoexport);
1165 1165
 			$stringtoexport = str_replace('medias/js/'.$website->ref.'/', "medias/js/__WEBSITE_KEY__/", $stringtoexport);
1166
-			$stringtoexport = str_replace('"image/'.$website->ref.'/', '"image/__WEBSITE_KEY__/', $stringtoexport);	// When we have a link src="image/websiteref/file.png" into html content
1167
-			$stringtoexport = str_replace('"/image/'.$website->ref.'/', '"/image/__WEBSITE_KEY__/', $stringtoexport);	// When we have a link src="/image/websiteref/file.png" into html content
1166
+			$stringtoexport = str_replace('"image/'.$website->ref.'/', '"image/__WEBSITE_KEY__/', $stringtoexport); // When we have a link src="image/websiteref/file.png" into html content
1167
+			$stringtoexport = str_replace('"/image/'.$website->ref.'/', '"/image/__WEBSITE_KEY__/', $stringtoexport); // When we have a link src="/image/websiteref/file.png" into html content
1168 1168
 			$stringtoexport = str_replace('"js/'.$website->ref.'/', '"js/__WEBSITE_KEY__/', $stringtoexport);
1169 1169
 			$stringtoexport = str_replace('"/js/'.$website->ref.'/', '"/js/__WEBSITE_KEY__/', $stringtoexport);
1170 1170
 
@@ -1472,7 +1472,7 @@  discard block
 block discarded – undo
1472 1472
 				foreach ($aliasesarray as $aliasshortcuttocreate) {
1473 1473
 					if (trim($aliasshortcuttocreate)) {
1474 1474
 						$filealias = $conf->website->dir_output.'/'.$object->ref.'/'.trim($aliasshortcuttocreate).'.php';
1475
-						$result = dolSavePageAlias($filealias, $object, $objectpagestatic);	// This includes also a copy into sublanguage directories.
1475
+						$result = dolSavePageAlias($filealias, $object, $objectpagestatic); // This includes also a copy into sublanguage directories.
1476 1476
 						if (!$result) {
1477 1477
 							$this->errors[] = 'Failed to write file '.basename($filealias);
1478 1478
 							$error++;
@@ -1493,7 +1493,7 @@  discard block
 block discarded – undo
1493 1493
 				$filetpl = $pathofwebsite.'/page'.$object->fk_default_home.'.tpl.php';
1494 1494
 			}
1495 1495
 			$filewrapper = $pathofwebsite.'/wrapper.php';
1496
-			dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper, $object);	// This includes also a version of index.php into sublanguage directories
1496
+			dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper, $object); // This includes also a version of index.php into sublanguage directories
1497 1497
 		}
1498 1498
 
1499 1499
 		if ($error) {
@@ -1940,7 +1940,7 @@  discard block
 block discarded – undo
1940 1940
 				$destContent = file_get_contents($fileNeeded['fullname']);
1941 1941
 
1942 1942
 				$numOfPageDest = $this->extractNumberFromFilename($fileNeeded['name']);
1943
-				$differences = $this->showDifferences($destContent, $sourceContent, array($numOfPageDest,$numOfPageSource));
1943
+				$differences = $this->showDifferences($destContent, $sourceContent, array($numOfPageDest, $numOfPageSource));
1944 1944
 				$differences['file_destination'] = $fileNeeded;
1945 1945
 			} else {
1946 1946
 				$differences = array();
@@ -1983,10 +1983,10 @@  discard block
 block discarded – undo
1983 1983
 		$linefound = array();
1984 1984
 		$countNumPage = count($exceptNumPge);
1985 1985
 
1986
-		for ($i = 0;$i < $countNumPage; $i++) {
1986
+		for ($i = 0; $i < $countNumPage; $i++) {
1987 1987
 			$linefound[$i] = array();
1988
-			$linefound[$i]['meta'] = '/content="' . preg_quote((string) $exceptNumPge[$i], '/') . '" \/>/';
1989
-			$linefound[$i]['output'] = '/dolWebsiteOutput\(\$tmp, "html", ' . preg_quote((string) $exceptNumPge[$i], '/') . '\);/';
1988
+			$linefound[$i]['meta'] = '/content="'.preg_quote((string) $exceptNumPge[$i], '/').'" \/>/';
1989
+			$linefound[$i]['output'] = '/dolWebsiteOutput\(\$tmp, "html", '.preg_quote((string) $exceptNumPge[$i], '/').'\);/';
1990 1990
 		}
1991 1991
 
1992 1992
 		if (isset($linefound[1])) {
@@ -2009,13 +2009,13 @@  discard block
 block discarded – undo
2009 2009
 				if ($lineContent1 !== $lineContent2) {
2010 2010
 					if (isset($lines1[$lineNum]) && !isset($lines2[$lineNum])) {
2011 2011
 						// Ligne deleted de la source
2012
-						$diff["Supprimée à la ligne " . ($lineNum + 1)] = $lineContent1;
2012
+						$diff["Supprimée à la ligne ".($lineNum + 1)] = $lineContent1;
2013 2013
 					} elseif (!isset($lines1[$lineNum]) && isset($lines2[$lineNum])) {
2014 2014
 						// Nouvelle ligne added dans la destination
2015
-						$diff["Ajoutée à la ligne " . ($lineNum + 1)] = $lineContent2;
2015
+						$diff["Ajoutée à la ligne ".($lineNum + 1)] = $lineContent2;
2016 2016
 					} else {
2017 2017
 						// Différence found it
2018
-						$diff["Modifiée à la ligne " . ($lineNum + 1)] = $lineContent2;
2018
+						$diff["Modifiée à la ligne ".($lineNum + 1)] = $lineContent2;
2019 2019
 					}
2020 2020
 				}
2021 2021
 			}
Please login to merge, or discard this patch.
htdocs/admin/remotestore/class/dolistore.class.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 			} elseif ($trace[0]['args'][0] == 401) {
141 141
 				die('Bad auth key');
142 142
 			} else {
143
-				print 'Can not access to ' . getDolGlobalString('MAIN_MODULE_DOLISTORE_API_SRV').'<br>';
143
+				print 'Can not access to '.getDolGlobalString('MAIN_MODULE_DOLISTORE_API_SRV').'<br>';
144 144
 				print $e->getMessage();
145 145
 			}
146 146
 		}
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 
180 180
 			// make a search to limit the id returned.
181 181
 			if ($this->search != '') {
182
-				$opt2['url'] = getDolGlobalString('MAIN_MODULE_DOLISTORE_API_SRV') . '/api/search?query='.$this->search.'&language='.$this->lang; // It seems for search, key start with
182
+				$opt2['url'] = getDolGlobalString('MAIN_MODULE_DOLISTORE_API_SRV').'/api/search?query='.$this->search.'&language='.$this->lang; // It seems for search, key start with
183 183
 
184 184
 				// Call
185 185
 				dol_syslog("Call API with opt2 = ".var_export($opt2, true));
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 			} elseif ($trace[0]['args'][0] == 401) {
227 227
 				die('Bad auth key');
228 228
 			} else {
229
-				print 'Can not access to ' . getDolGlobalString('MAIN_MODULE_DOLISTORE_API_SRV').'<br>';
229
+				print 'Can not access to '.getDolGlobalString('MAIN_MODULE_DOLISTORE_API_SRV').'<br>';
230 230
 				print $e->getMessage();
231 231
 			}
232 232
 		}
@@ -378,16 +378,16 @@  discard block
 block discarded – undo
378 378
 			//output template
379 379
 			$html .= '<tr class="app oddeven '.dol_escape_htmltag($compatible).'">';
380 380
 			$html .= '<td class="center" width="160"><div class="newAppParent">';
381
-			$html .= $newapp.$images;	// No dol_escape_htmltag, it is already escape html
381
+			$html .= $newapp.$images; // No dol_escape_htmltag, it is already escape html
382 382
 			$html .= '</div></td>';
383 383
 			$html .= '<td class="margeCote"><h2 class="appTitle">';
384 384
 			$html .= dol_escape_htmltag(dol_string_nohtmltag($product->name->language[$this->lang - 1]));
385 385
 			$html .= '<br><small>';
386
-			$html .= $version;			// No dol_escape_htmltag, it is already escape html
386
+			$html .= $version; // No dol_escape_htmltag, it is already escape html
387 387
 			$html .= '</small></h2>';
388 388
 			$html .= '<small> '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.dol_escape_htmltag($product->reference).' - '.dol_escape_htmltag($langs->trans('Id')).': '.((int) $product->id).'</small><br>';
389 389
 			$html .= '<br>'.dol_escape_htmltag(dol_string_nohtmltag($product->description_short->language[$this->lang - 1]));
390
-			$html.= '</td>';
390
+			$html .= '</td>';
391 391
 			// do not load if display none
392 392
 			$html .= '<td class="margeCote center amount">';
393 393
 			$html .= $price;
Please login to merge, or discard this patch.
htdocs/admin/modules.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 $options['end']       = ((int) (GETPOSTINT('end') ? GETPOSTINT('end') : 0));
88 88
 $options['search']    = GETPOST('search_keyword', 'alpha');
89 89
 
90
-$remotestore            = new Dolistore(false);
90
+$remotestore = new Dolistore(false);
91 91
 
92 92
 
93 93
 if (!$user->admin) {
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 				//var_dump($modulenamearrays);exit;
314 314
 
315 315
 				// Lop on each packages (can have several if package is a metapackage)
316
-				if (! $error) {
316
+				if (!$error) {
317 317
 					foreach ($modulenamearrays as $modulenameval) {
318 318
 						if (strpos($modulenameval, '#') === 0) {
319 319
 							continue; // Discard comments
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 			'search_version' => '-1'
383 383
 		);
384 384
 		$queryString = http_build_query($searchParams);
385
-		$redirectUrl = DOL_URL_ROOT . '/admin/modules.php?' . $queryString;
385
+		$redirectUrl = DOL_URL_ROOT.'/admin/modules.php?'.$queryString;
386 386
 
387 387
 		$message = $langs->trans("SetupIsReadyForUse", $redirectUrl, $langs->transnoentitiesnoconv("Home").' - '.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Modules"));
388 388
 
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
 								} else {
585 585
 									$familykey = $objMod->family;
586 586
 								}
587
-								'@phan-var-force string $familykey';  // if not, phan considers $familykey may be null
587
+								'@phan-var-force string $familykey'; // if not, phan considers $familykey may be null
588 588
 
589 589
 								$moduleposition = ($objMod->module_position ? $objMod->module_position : '50');
590 590
 								if ($objMod->isCoreOrExternalModule() == 'external' && $moduleposition < 100000) {
@@ -690,7 +690,7 @@  discard block
 block discarded – undo
690 690
 print load_fiche_titre($langs->trans("ModulesSetup"), '', 'title_setup');
691 691
 
692 692
 // Start to show page
693
-$deschelp  = '';
693
+$deschelp = '';
694 694
 if ($mode == 'common' || $mode == 'commonkanban') {
695 695
 	$desc = $langs->trans("ModulesDesc", '{picto}');
696 696
 	$desc .= ' '.$langs->trans("ModulesDesc2", '{picto2}');
@@ -977,7 +977,7 @@  discard block
 block discarded – undo
977 977
 		}
978 978
 
979 979
 		if ($objMod->isCoreOrExternalModule() == 'external' && $action == 'checklastversion' && !getDolGlobalString('DISABLE_CHECK_ON_MALWARE_MODULES')) {
980
-			$checkRes = $objMod->checkForCompliance();	// Check if module is reported as non compliant with Dolibarr rules and law
980
+			$checkRes = $objMod->checkForCompliance(); // Check if module is reported as non compliant with Dolibarr rules and law
981 981
 			if (!is_numeric($checkRes) && $checkRes != '') {
982 982
 				$langs->load("errors");
983 983
 				setEventMessages($objMod->getName().' : '.$langs->trans($checkRes), null, 'errors');
@@ -1309,7 +1309,7 @@  discard block
 block discarded – undo
1309 1309
 			<div id="category-tree-left">
1310 1310
 				<ul class="tree">
1311 1311
 					<?php
1312
-					echo $remotestore->get_categories();	// Do not use dol_escape_htmltag here, it is already a structured content?>
1312
+					echo $remotestore->get_categories(); // Do not use dol_escape_htmltag here, it is already a structured content?>
1313 1313
 				</ul>
1314 1314
 			</div>
1315 1315
 
Please login to merge, or discard this patch.
htdocs/user/class/user.class.php 1 patch
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -688,11 +688,11 @@  discard block
 block discarded – undo
688 688
 
689 689
 				$this->job = $obj->job;
690 690
 				$this->signature = $obj->signature;
691
-				$this->admin		= $obj->admin;
691
+				$this->admin = $obj->admin;
692 692
 				$this->note_public = $obj->note_public;
693 693
 				$this->note_private = $obj->note_private;
694 694
 
695
-				$this->statut		= $obj->status;			// deprecated
695
+				$this->statut		= $obj->status; // deprecated
696 696
 				$this->status		= $obj->status;
697 697
 
698 698
 				$this->photo		= $obj->photo;
@@ -824,7 +824,7 @@  discard block
 block discarded – undo
824 824
 			require_once DOL_DOCUMENT_ROOT.'/core/class/defaultvalues.class.php';
825 825
 
826 826
 			$defaultValues = new DefaultValues($this->db);
827
-			$result = $defaultValues->fetchAll('', '', 0, 0, '(t.user_id:in:0,'.$this->id.') AND (entity:in:'.(isset($this->entity) ? $this->entity : $conf->entity).','.$conf->entity.')');	// User 0 (all) + me (if defined)
827
+			$result = $defaultValues->fetchAll('', '', 0, 0, '(t.user_id:in:0,'.$this->id.') AND (entity:in:'.(isset($this->entity) ? $this->entity : $conf->entity).','.$conf->entity.')'); // User 0 (all) + me (if defined)
828 828
 			//$result = $defaultValues->fetchAll('', '', 0, 0, array('t.user_id'=>array(0, $this->id), 'entity'=>array((isset($this->entity) ? $this->entity : $conf->entity), $conf->entity)));	// User 0 (all) + me (if defined)
829 829
 
830 830
 			if (!is_array($result) && $result < 0) {
@@ -939,16 +939,16 @@  discard block
 block discarded – undo
939 939
 		// Special case for external user
940 940
 		if (!empty($this->socid)) {
941 941
 			if ($module == 'societe' && ($permlevel1 == 'creer' || $permlevel1 == 'write')) {
942
-				return 0;	// An external user never has the permission ->societe->write to see all thirdparties (always restricted to himself)
942
+				return 0; // An external user never has the permission ->societe->write to see all thirdparties (always restricted to himself)
943 943
 			}
944 944
 			if ($module == 'societe' && $permlevel1 == 'client' && $permlevel2 == 'voir') {
945
-				return 0;	// An external user never has the permission ->societe->client->voir to see all thirdparties (always restricted to himself)
945
+				return 0; // An external user never has the permission ->societe->client->voir to see all thirdparties (always restricted to himself)
946 946
 			}
947 947
 			if ($module == 'societe' && $permlevel1 == 'export') {
948
-				return 0;	// An external user never has the permission ->societe->export to see all thirdparties (always restricted to himself)
948
+				return 0; // An external user never has the permission ->societe->export to see all thirdparties (always restricted to himself)
949 949
 			}
950 950
 			if ($module == 'societe' && ($permlevel1 == 'supprimer' || $permlevel1 == 'delete')) {
951
-				return 0;	// An external user never has the permission ->societe->delete to see all thirdparties (always restricted to himself)
951
+				return 0; // An external user never has the permission ->societe->delete to see all thirdparties (always restricted to himself)
952 952
 			}
953 953
 		}
954 954
 
@@ -1096,7 +1096,7 @@  discard block
 block discarded – undo
1096 1096
 			$sql .= " FROM ".$this->db->prefix()."rights_def";
1097 1097
 			$sql .= " WHERE entity = ".((int) $entity);
1098 1098
 			if (!empty($whereforadd) && $whereforadd != 'allmodules') {
1099
-				$sql .= " AND (".$whereforadd.")";	// Note: parenthesis are important because whereforadd can contains OR. Also note that $whereforadd is already sanitized
1099
+				$sql .= " AND (".$whereforadd.")"; // Note: parenthesis are important because whereforadd can contains OR. Also note that $whereforadd is already sanitized
1100 1100
 			}
1101 1101
 
1102 1102
 			$sqldelete = "DELETE FROM ".$this->db->prefix()."user_rights";
@@ -1232,7 +1232,7 @@  discard block
 block discarded – undo
1232 1232
 			$sql .= " FROM ".$this->db->prefix()."rights_def";
1233 1233
 			$sql .= " WHERE entity IN (".$this->db->sanitize($entity, 0, 0, 0, 0).")";
1234 1234
 			if (!empty($wherefordel) && $wherefordel != 'allmodules') {
1235
-				$sql .= " AND (".$wherefordel.")";	// Note: parenthesis are important because wherefordel can contains OR. Also note that $wherefordel is already sanitized
1235
+				$sql .= " AND (".$wherefordel.")"; // Note: parenthesis are important because wherefordel can contains OR. Also note that $wherefordel is already sanitized
1236 1236
 			}
1237 1237
 
1238 1238
 			// avoid admin to remove his own important rights
@@ -1411,12 +1411,12 @@  discard block
 block discarded – undo
1411 1411
 					$sql .= " AND r.entity = ".((int) $conf->entity);
1412 1412
 				}
1413 1413
 			} else {
1414
-				$sql .= " AND gr.entity = ".((int) $conf->entity);	// Only groups created in current entity
1414
+				$sql .= " AND gr.entity = ".((int) $conf->entity); // Only groups created in current entity
1415 1415
 				// The entity on the table gu=usergroup_user should be useless and should never be used because it is already into gr and r.
1416 1416
 				// but when using MULTICOMPANY_TRANSVERSE_MODE, we may have inserted record that make rubbish result here due to the duplicate record of
1417 1417
 				// other entities, so we are forced to add a filter on gu here
1418 1418
 				$sql .= " AND gu.entity IN (0,".$conf->entity.")";
1419
-				$sql .= " AND r.entity = ".((int) $conf->entity);	// Only permission of modules enabled in current entity
1419
+				$sql .= " AND r.entity = ".((int) $conf->entity); // Only permission of modules enabled in current entity
1420 1420
 			}
1421 1421
 			// End of strange business rule
1422 1422
 			$sql .= " AND gr.fk_usergroup = gu.fk_usergroup";
@@ -1970,7 +1970,7 @@  discard block
 block discarded – undo
1970 1970
 		$this->civility_code = $member->civility_code;
1971 1971
 		$this->lastname     = $member->lastname;
1972 1972
 		$this->firstname    = $member->firstname;
1973
-		$this->gender		= $member->gender;
1973
+		$this->gender = $member->gender;
1974 1974
 		$this->email        = $member->email;
1975 1975
 		$this->fk_member    = $member->id;
1976 1976
 		$this->address      = $member->address;
@@ -2108,45 +2108,45 @@  discard block
 block discarded – undo
2108 2108
 		$this->lastname						= trim((string) $this->lastname);
2109 2109
 		$this->firstname					= trim((string) $this->firstname);
2110 2110
 		$this->ref_employee					= trim((string) $this->ref_employee);
2111
-		$this->national_registration_number	= trim((string) $this->national_registration_number);
2111
+		$this->national_registration_number = trim((string) $this->national_registration_number);
2112 2112
 		$this->employee						= ($this->employee > 0 ? $this->employee : 0);
2113 2113
 		$this->login						= trim((string) $this->login);
2114
-		$this->gender						= trim((string) $this->gender);
2114
+		$this->gender = trim((string) $this->gender);
2115 2115
 
2116 2116
 		$this->pass							= trim((string) $this->pass);
2117
-		$this->api_key						= trim((string) $this->api_key);
2118
-		$this->datestartvalidity			= empty($this->datestartvalidity) ? '' : $this->datestartvalidity;
2119
-		$this->dateendvalidity				= empty($this->dateendvalidity) ? '' : $this->dateendvalidity;
2117
+		$this->api_key = trim((string) $this->api_key);
2118
+		$this->datestartvalidity = empty($this->datestartvalidity) ? '' : $this->datestartvalidity;
2119
+		$this->dateendvalidity = empty($this->dateendvalidity) ? '' : $this->dateendvalidity;
2120 2120
 
2121
-		$this->address						= trim((string) $this->address);
2122
-		$this->zip							= trim((string) $this->zip);
2123
-		$this->town							= trim((string) $this->town);
2121
+		$this->address = trim((string) $this->address);
2122
+		$this->zip = trim((string) $this->zip);
2123
+		$this->town = trim((string) $this->town);
2124 2124
 
2125
-		$this->state_id						= ($this->state_id > 0 ? $this->state_id : 0);
2125
+		$this->state_id = ($this->state_id > 0 ? $this->state_id : 0);
2126 2126
 		$this->country_id					= ($this->country_id > 0 ? $this->country_id : 0);
2127
-		$this->office_phone					= trim((string) $this->office_phone);
2127
+		$this->office_phone = trim((string) $this->office_phone);
2128 2128
 		$this->office_fax					= trim((string) $this->office_fax);
2129
-		$this->user_mobile					= trim((string) $this->user_mobile);
2130
-		$this->personal_mobile				= trim((string) $this->personal_mobile);
2131
-		$this->email						= trim((string) $this->email);
2132
-		$this->personal_email				= trim((string) $this->personal_email);
2133
-
2134
-		$this->job							= trim((string) $this->job);
2135
-		$this->signature					= trim((string) $this->signature);
2136
-		$this->note_public					= trim((string) $this->note_public);
2137
-		$this->note_private					= trim((string) $this->note_private);
2138
-		$this->openid						= trim((string) $this->openid);
2139
-		$this->admin						= ($this->admin > 0 ? $this->admin : 0);
2140
-
2141
-		$this->accountancy_code_user_general	= trim((string) $this->accountancy_code_user_general);
2129
+		$this->user_mobile = trim((string) $this->user_mobile);
2130
+		$this->personal_mobile = trim((string) $this->personal_mobile);
2131
+		$this->email = trim((string) $this->email);
2132
+		$this->personal_email = trim((string) $this->personal_email);
2133
+
2134
+		$this->job = trim((string) $this->job);
2135
+		$this->signature = trim((string) $this->signature);
2136
+		$this->note_public = trim((string) $this->note_public);
2137
+		$this->note_private = trim((string) $this->note_private);
2138
+		$this->openid = trim((string) $this->openid);
2139
+		$this->admin = ($this->admin > 0 ? $this->admin : 0);
2140
+
2141
+		$this->accountancy_code_user_general = trim((string) $this->accountancy_code_user_general);
2142 2142
 		$this->accountancy_code				= trim((string) $this->accountancy_code);
2143
-		$this->color						= trim((string) $this->color);
2144
-		$this->dateemployment				= empty($this->dateemployment) ? '' : $this->dateemployment;
2143
+		$this->color = trim((string) $this->color);
2144
+		$this->dateemployment = empty($this->dateemployment) ? '' : $this->dateemployment;
2145 2145
 		$this->dateemploymentend			= empty($this->dateemploymentend) ? '' : $this->dateemploymentend;
2146 2146
 
2147
-		$this->birth						= empty($this->birth) ? '' : $this->birth;
2148
-		$this->fk_warehouse					= (int) $this->fk_warehouse;
2149
-		$this->fk_establishment				= (int) $this->fk_establishment;
2147
+		$this->birth = empty($this->birth) ? '' : $this->birth;
2148
+		$this->fk_warehouse = (int) $this->fk_warehouse;
2149
+		$this->fk_establishment = (int) $this->fk_establishment;
2150 2150
 
2151 2151
 		$this->setUpperOrLowerCase();
2152 2152
 
@@ -2914,7 +2914,7 @@  discard block
 block discarded – undo
2914 2914
 		$sql .= " WHERE fk_user  = ".((int) $this->id);
2915 2915
 		$sql .= " AND fk_usergroup = ".((int) $group);
2916 2916
 		if (empty($entity)) {
2917
-			$sql .= " AND entity IN (0, 1)";	// group may be in entity 0 (so $entity=0) and link with user into entity 1.
2917
+			$sql .= " AND entity IN (0, 1)"; // group may be in entity 0 (so $entity=0) and link with user into entity 1.
2918 2918
 		} else {
2919 2919
 			$sql .= " AND entity = ".((int) $entity);
2920 2920
 		}
@@ -3175,7 +3175,7 @@  discard block
 block discarded – undo
3175 3175
 				$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
3176 3176
 			}
3177 3177
 			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');
3178
-			$linkclose .= $dataparams . ' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"';
3178
+			$linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"';
3179 3179
 		} else {
3180 3180
 			$linkclose = ($morecss ? ' class="'.$morecss.'"' : '');
3181 3181
 		}
@@ -3414,11 +3414,11 @@  discard block
 block discarded – undo
3414 3414
 		global $conf;
3415 3415
 		$dn = '';
3416 3416
 		if ($mode == 0) {
3417
-			$dn = getDolGlobalString('LDAP_KEY_USERS') . "=".$info[getDolGlobalString('LDAP_KEY_USERS')]."," . getDolGlobalString('LDAP_USER_DN');
3417
+			$dn = getDolGlobalString('LDAP_KEY_USERS')."=".$info[getDolGlobalString('LDAP_KEY_USERS')].",".getDolGlobalString('LDAP_USER_DN');
3418 3418
 		} elseif ($mode == 1) {
3419 3419
 			$dn = getDolGlobalString('LDAP_USER_DN');
3420 3420
 		} elseif ($mode == 2) {
3421
-			$dn = getDolGlobalString('LDAP_KEY_USERS') . "=".$info[getDolGlobalString('LDAP_KEY_USERS')];
3421
+			$dn = getDolGlobalString('LDAP_KEY_USERS')."=".$info[getDolGlobalString('LDAP_KEY_USERS')];
3422 3422
 		}
3423 3423
 		return $dn;
3424 3424
 	}
@@ -3633,7 +3633,7 @@  discard block
 block discarded – undo
3633 3633
 		$this->iplastlogin = '127.0.0.1';
3634 3634
 		$this->datepreviouslogin = $now;
3635 3635
 		$this->ippreviouslogin = '127.0.0.1';
3636
-		$this->statut = 1;		// deprecated
3636
+		$this->statut = 1; // deprecated
3637 3637
 		$this->status = 1;
3638 3638
 
3639 3639
 		$this->entity = 1;
Please login to merge, or discard this patch.
htdocs/user/bank.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -104,8 +104,8 @@  discard block
 block discarded – undo
104 104
 
105 105
 // Define value to know what current user can do on users
106 106
 $selfpermission = ($user->id == $id && $user->hasRight('user', 'self', 'creer'));
107
-$usercanadd = (!empty($user->admin) || $user->hasRight('user', 'user', 'creer') || $user->hasRight('hrm', 'write_personal_information', 'write') );
108
-$usercanread = (!empty($user->admin) || $user->hasRight('user', 'user', 'lire') || $user->hasRight('hrm', 'read_personal_information', 'read') );
107
+$usercanadd = (!empty($user->admin) || $user->hasRight('user', 'user', 'creer') || $user->hasRight('hrm', 'write_personal_information', 'write'));
108
+$usercanread = (!empty($user->admin) || $user->hasRight('user', 'user', 'lire') || $user->hasRight('hrm', 'read_personal_information', 'read'));
109 109
 $permissiontoaddbankaccount = ($user->hasRight('salaries', 'write') || $user->hasRight('hrm', 'employee', 'write') || $user->hasRight('user', 'user', 'creer') || $selfpermission);
110 110
 $permissiontoreadhr = $user->hasRight('hrm', 'read_personal_information', 'read') || $user->hasRight('hrm', 'write_personal_information', 'write');
111 111
 $permissiontowritehr = $user->hasRight('hrm', 'write_personal_information', 'write');
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
 			$accountingaccount->fetch(0, $object->accountancy_code_user_general, 1);
631 631
 			print $accountingaccount->getNomUrl(0, 1, 1, '', 1);
632 632
 		}
633
-		$accountingAccountByDefault = " (" . $langs->trans("AccountingAccountByDefaultShort") . ": " . length_accountg(getDolGlobalString('SALARIES_ACCOUNTING_ACCOUNT_PAYMENT')) . ")";
633
+		$accountingAccountByDefault = " (".$langs->trans("AccountingAccountByDefaultShort").": ".length_accountg(getDolGlobalString('SALARIES_ACCOUNTING_ACCOUNT_PAYMENT')).")";
634 634
 		print (getDolGlobalString('SALARIES_ACCOUNTING_ACCOUNT_PAYMENT') ? $accountingAccountByDefault : '');
635 635
 		print '</td>';
636 636
 
Please login to merge, or discard this patch.
htdocs/accountancy/journal/bankjournal.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
 
549 549
 						if (empty($obj->typeop_user)) {	// Add test to avoid adding amount twice if a link already exists also on user.
550 550
 							$accountancy_code_user_general = (!empty($obj->accountancy_code_user_general)) ? $obj->accountancy_code_user_general : $account_employee;
551
-                            $compta_user = $userstatic->accountancy_code;
551
+							$compta_user = $userstatic->accountancy_code;
552 552
 							if ($compta_user) {
553 553
 								$tabtp[$obj->rowid][$compta_user] += $amounttouse;
554 554
 								$tabuser[$obj->rowid] = array(
@@ -1048,20 +1048,20 @@  discard block
 block discarded – undo
1048 1048
 					print '"'.$key.'"'.$sep;
1049 1049
 					print '"'.$date.'"'.$sep;
1050 1050
 					print '"'.$val["type_payment"].'"'.$sep;
1051
-                    if ($tabtype[$key] == 'payment_supplier') {
1052
-                        $account_ledger = (!empty($obj->accountancy_code_supplier_general)) ? $obj->accountancy_code_supplier_general : $account_supplier;
1053
-                        print '"'.length_accountg($account_ledger).'"'.$sep;
1054
-                    } elseif ($tabtype[$key] == 'payment') {
1055
-                        $account_ledger = (!empty($obj->accountancy_code_customer_general)) ? $obj->accountancy_code_customer_general : $account_customer;
1056
-                        print '"'.length_accountg($account_ledger).'"'.$sep;
1057
-                    } elseif ($tabtype[$key] == 'payment_expensereport') {
1058
-                        print '"'.length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_EXPENSEREPORT')).'"'.$sep;
1059
-                    } elseif ($tabtype[$key] == 'payment_salary') {
1060
-                        $account_ledger = (!empty($obj->accountancy_code_user_general)) ? $obj->accountancy_code_user_general : $account_employee;
1061
-                        print '"'.length_accountg($account_ledger).'"'.$sep;
1062
-                    } else {
1063
-                        print '"'.length_accountg(html_entity_decode($k)).'"'.$sep;
1064
-                    }
1051
+					if ($tabtype[$key] == 'payment_supplier') {
1052
+						$account_ledger = (!empty($obj->accountancy_code_supplier_general)) ? $obj->accountancy_code_supplier_general : $account_supplier;
1053
+						print '"'.length_accountg($account_ledger).'"'.$sep;
1054
+					} elseif ($tabtype[$key] == 'payment') {
1055
+						$account_ledger = (!empty($obj->accountancy_code_customer_general)) ? $obj->accountancy_code_customer_general : $account_customer;
1056
+						print '"'.length_accountg($account_ledger).'"'.$sep;
1057
+					} elseif ($tabtype[$key] == 'payment_expensereport') {
1058
+						print '"'.length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_EXPENSEREPORT')).'"'.$sep;
1059
+					} elseif ($tabtype[$key] == 'payment_salary') {
1060
+						$account_ledger = (!empty($obj->accountancy_code_user_general)) ? $obj->accountancy_code_user_general : $account_employee;
1061
+						print '"'.length_accountg($account_ledger).'"'.$sep;
1062
+					} else {
1063
+						print '"'.length_accountg(html_entity_decode($k)).'"'.$sep;
1064
+					}
1065 1065
 					print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
1066 1066
 					print '"'.$reflabel.'"'.$sep;
1067 1067
 					print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep;
@@ -1340,16 +1340,16 @@  discard block
 block discarded – undo
1340 1340
 					$account_ledger = $k;
1341 1341
 					// Try to force general ledger account depending on type
1342 1342
 					if ($tabtype[$key] == 'payment') {
1343
-                        $account_ledger = (!empty($obj->accountancy_code_customer_general)) ? $obj->accountancy_code_customer_general : $account_customer;
1343
+						$account_ledger = (!empty($obj->accountancy_code_customer_general)) ? $obj->accountancy_code_customer_general : $account_customer;
1344 1344
 					}
1345 1345
 					if ($tabtype[$key] == 'payment_supplier') {
1346
-                        $account_ledger = (!empty($obj->accountancy_code_supplier_general)) ? $obj->accountancy_code_supplier_general : $account_supplier;
1346
+						$account_ledger = (!empty($obj->accountancy_code_supplier_general)) ? $obj->accountancy_code_supplier_general : $account_supplier;
1347 1347
 					}
1348 1348
 					if ($tabtype[$key] == 'payment_expensereport') {
1349 1349
 						$account_ledger = getDolGlobalString('ACCOUNTING_ACCOUNT_EXPENSEREPORT');
1350 1350
 					}
1351 1351
 					if ($tabtype[$key] == 'payment_salary') {
1352
-                        $account_ledger = (!empty($obj->accountancy_code_user_general)) ? $obj->accountancy_code_user_general : $account_employee;
1352
+						$account_ledger = (!empty($obj->accountancy_code_user_general)) ? $obj->accountancy_code_user_general : $account_employee;
1353 1353
 					}
1354 1354
 					if ($tabtype[$key] == 'payment_vat') {
1355 1355
 						$account_ledger = getDolGlobalString('ACCOUNTING_VAT_PAY_ACCOUNT');
Please login to merge, or discard this patch.
htdocs/accountancy/closure/index.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 			if ($fiscal_period_id == $fiscal_period['id'] || (empty($fiscal_period_id) && $fiscal_period['date_start'] <= $now && $now <= $fiscal_period['date_end'])) {
96 96
 				$current_fiscal_period = $fiscal_period;
97 97
 			} else {
98
-				$last_fiscal_period = $fiscal_period;	// $last_fiscal_period is in fact $previous_fiscal_period
98
+				$last_fiscal_period = $fiscal_period; // $last_fiscal_period is in fact $previous_fiscal_period
99 99
 			}
100 100
 		}
101 101
 	}
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 			if ($result > 0) {
145 145
 				setEventMessages($langs->trans("AllMovementsWereRecordedAsValidated"), null, 'mesgs');
146 146
 
147
-				header("Location: " . $_SERVER['PHP_SELF'] . (isset($current_fiscal_period) ? '?fiscal_period_id=' . $current_fiscal_period['id'] : ''));
147
+				header("Location: ".$_SERVER['PHP_SELF'].(isset($current_fiscal_period) ? '?fiscal_period_id='.$current_fiscal_period['id'] : ''));
148 148
 				exit;
149 149
 			} else {
150 150
 				setEventMessages($langs->trans("NotAllMovementsCouldBeRecordedAsValidated"), null, 'errors');
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 				} else {
175 175
 					setEventMessages($langs->trans("AccountancyClosureCloseSuccessfully"), null, 'mesgs');
176 176
 
177
-					header("Location: " . $_SERVER['PHP_SELF'] . (isset($current_fiscal_period) ? '?fiscal_period_id=' . $current_fiscal_period['id'] : ''));
177
+					header("Location: ".$_SERVER['PHP_SELF'].(isset($current_fiscal_period) ? '?fiscal_period_id='.$current_fiscal_period['id'] : ''));
178 178
 					exit;
179 179
 				}
180 180
 			}
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 			} else {
191 191
 				setEventMessages($langs->trans("AccountancyClosureInsertAccountingReversalSuccessfully"), null, 'mesgs');
192 192
 
193
-				header("Location: " . $_SERVER['PHP_SELF'] . (isset($current_fiscal_period) ? '?fiscal_period_id=' . $current_fiscal_period['id'] : ''));
193
+				header("Location: ".$_SERVER['PHP_SELF'].(isset($current_fiscal_period) ? '?fiscal_period_id='.$current_fiscal_period['id'] : ''));
194 194
 				exit;
195 195
 			}
196 196
 		}
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 		);
232 232
 
233 233
 		$formconfirm = $form->formconfirm(
234
-			$_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $current_fiscal_period['id'],
234
+			$_SERVER["PHP_SELF"].'?fiscal_period_id='.$current_fiscal_period['id'],
235 235
 			$langs->trans('ValidateMovements'),
236 236
 			$langs->trans('DescValidateMovements', $langs->transnoentitiesnoconv("RegistrationInAccounting")),
237 237
 			'confirm_step_1',
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 		);
270 270
 
271 271
 		$formconfirm = $form->formconfirm(
272
-			$_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $current_fiscal_period['id'],
272
+			$_SERVER["PHP_SELF"].'?fiscal_period_id='.$current_fiscal_period['id'],
273 273
 			$langs->trans('AccountancyClosureClose'),
274 274
 			$langs->trans('AccountancyClosureConfirmClose'),
275 275
 			'confirm_step_2',
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 		);
314 314
 
315 315
 		$formconfirm = $form->formconfirm(
316
-			$_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $current_fiscal_period['id'],
316
+			$_SERVER["PHP_SELF"].'?fiscal_period_id='.$current_fiscal_period['id'],
317 317
 			$langs->trans('AccountancyClosureAccountingReversal'),
318 318
 			$langs->trans('AccountancyClosureConfirmAccountingReversal'),
319 319
 			'confirm_step_3',
@@ -340,13 +340,13 @@  discard block
 block discarded – undo
340 340
 
341 341
 $fiscal_period_nav_text = $langs->trans("FiscalPeriod");
342 342
 
343
-$fiscal_period_nav_text .= '&nbsp;<a href="' . (isset($last_fiscal_period) ? $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $last_fiscal_period['id'] : '#" class="disabled') . '">' . img_previous() . '</a>';
344
-$fiscal_period_nav_text .= '&nbsp;<a href="' . (isset($next_fiscal_period) ? $_SERVER["PHP_SELF"] . '?fiscal_period_id=' . $next_fiscal_period['id'] : '#" class="disabled') . '">' . img_next() . '</a>';
343
+$fiscal_period_nav_text .= '&nbsp;<a href="'.(isset($last_fiscal_period) ? $_SERVER["PHP_SELF"].'?fiscal_period_id='.$last_fiscal_period['id'] : '#" class="disabled').'">'.img_previous().'</a>';
344
+$fiscal_period_nav_text .= '&nbsp;<a href="'.(isset($next_fiscal_period) ? $_SERVER["PHP_SELF"].'?fiscal_period_id='.$next_fiscal_period['id'] : '#" class="disabled').'">'.img_next().'</a>';
345 345
 if (!empty($current_fiscal_period)) {
346
-	$fiscal_period_nav_text .= $current_fiscal_period['label'].' &nbsp;(' . (isset($current_fiscal_period) ? dol_print_date($current_fiscal_period['date_start'], 'day') . '&nbsp;-&nbsp;' . dol_print_date($current_fiscal_period['date_end'], 'day') . ')' : '');
346
+	$fiscal_period_nav_text .= $current_fiscal_period['label'].' &nbsp;('.(isset($current_fiscal_period) ? dol_print_date($current_fiscal_period['date_start'], 'day').'&nbsp;-&nbsp;'.dol_print_date($current_fiscal_period['date_end'], 'day').')' : '');
347 347
 }
348 348
 
349
-print load_fiche_titre($langs->trans("Closure") . " - " . $fiscal_period_nav_text, '', 'title_accountancy');
349
+print load_fiche_titre($langs->trans("Closure")." - ".$fiscal_period_nav_text, '', 'title_accountancy');
350 350
 
351 351
 if (empty($current_fiscal_period)) {
352 352
 	print $langs->trans('ErrorNoFiscalPeriodActiveFound', $langs->transnoentitiesnoconv("Accounting"), $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("FiscalPeriod"));
@@ -354,12 +354,12 @@  discard block
 block discarded – undo
354 354
 	if (!getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE")) {
355 355
 		// Step 1
356 356
 		$head = array();
357
-		$head[0][0] = DOL_URL_ROOT . '/accountancy/closure/index.php?fiscal_period_id=' . $current_fiscal_period['id'];
357
+		$head[0][0] = DOL_URL_ROOT.'/accountancy/closure/index.php?fiscal_period_id='.$current_fiscal_period['id'];
358 358
 		$head[0][1] = $langs->trans("Step").' 1 - '.$langs->trans("AccountancyClosureStep1");
359 359
 		$head[0][2] = 'step1';
360 360
 		print dol_get_fiche_head($head, 'step1', '', -1, '');
361 361
 
362
-		print '<span class="opacitymedium">' . $langs->trans("AccountancyClosureStep1Desc") . '</span><br>';
362
+		print '<span class="opacitymedium">'.$langs->trans("AccountancyClosureStep1Desc").'</span><br>';
363 363
 
364 364
 		$count_by_month = $object->getCountByMonthForFiscalPeriod($current_fiscal_period['date_start'], $current_fiscal_period['date_end']);
365 365
 
@@ -368,9 +368,9 @@  discard block
 block discarded – undo
368 368
 		}
369 369
 
370 370
 		if (empty($count_by_month['total'])) {
371
-			$buttonvalidate = '<a class="butActionRefused classfortooltip" href="#">' . $langs->trans("ValidateMovements") . '</a>';
371
+			$buttonvalidate = '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans("ValidateMovements").'</a>';
372 372
 		} else {
373
-			$buttonvalidate = '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=step_1&token='.newToken().'&fiscal_period_id=' . $current_fiscal_period['id'] . '">' . $langs->trans("ValidateMovements") . '</a>';
373
+			$buttonvalidate = '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=step_1&token='.newToken().'&fiscal_period_id='.$current_fiscal_period['id'].'">'.$langs->trans("ValidateMovements").'</a>';
374 374
 		}
375 375
 		print_barre_liste($langs->trans("OverviewOfMovementsNotValidated"), 0, '', '', '', '', '', -1, '', '', 0, $buttonvalidate, '', 0, 1, 0);
376 376
 
@@ -380,24 +380,24 @@  discard block
 block discarded – undo
380 380
 		print '<tr class="liste_titre">';
381 381
 		$nb_years = is_array($count_by_month['list']) ? count($count_by_month['list']) : 0;
382 382
 		if ($nb_years > 1) {
383
-			print '<td class="right">' . $langs->trans("Year") . '</td>';
383
+			print '<td class="right">'.$langs->trans("Year").'</td>';
384 384
 		}
385 385
 		for ($i = 1; $i <= 12; $i++) {
386
-			print '<td class="right">' . $langs->trans('MonthShort' . str_pad((string) $i, 2, '0', STR_PAD_LEFT)) . '</td>';
386
+			print '<td class="right">'.$langs->trans('MonthShort'.str_pad((string) $i, 2, '0', STR_PAD_LEFT)).'</td>';
387 387
 		}
388
-		print '<td class="right"><b>' . $langs->trans("Total") . '</b></td>';
388
+		print '<td class="right"><b>'.$langs->trans("Total").'</b></td>';
389 389
 		print '</tr>';
390 390
 
391 391
 		if (is_array($count_by_month['list'])) {
392 392
 			foreach ($count_by_month['list'] as $info) {
393 393
 				print '<tr class="oddeven">';
394 394
 				if ($nb_years > 1) {
395
-					print '<td class="right">' . $info['year'] . '</td>';
395
+					print '<td class="right">'.$info['year'].'</td>';
396 396
 				}
397 397
 				for ($i = 1; $i <= 12; $i++) {
398
-					print '<td class="right">' . ((int) $info['count'][$i]) . '</td>';
398
+					print '<td class="right">'.((int) $info['count'][$i]).'</td>';
399 399
 				}
400
-				print '<td class="right"><b>' . $info['total'] . '</b></td></tr>';
400
+				print '<td class="right"><b>'.$info['total'].'</b></td></tr>';
401 401
 			}
402 402
 		}
403 403
 
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
 
410 410
 	// Step 2
411 411
 	$head = array();
412
-	$head[0][0] = DOL_URL_ROOT . '/accountancy/closure/index.php?fiscal_period_id=' . $current_fiscal_period['id'];
412
+	$head[0][0] = DOL_URL_ROOT.'/accountancy/closure/index.php?fiscal_period_id='.$current_fiscal_period['id'];
413 413
 	$head[0][1] = $langs->trans("Step").(getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE") ? '1' : '2').' - '.$langs->trans("AccountancyClosureStep2");
414 414
 	$head[0][2] = 'step2';
415 415
 	print dol_get_fiche_head($head, 'step2', '', -1, '');
@@ -418,12 +418,12 @@  discard block
 block discarded – undo
418 418
 	// print '<span class="opacitymedium">' . $langs->trans("AccountancyClosureStep2Desc") . '</span><br>';
419 419
 	if ((empty($count_by_month['total']) || getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE")) && empty($current_fiscal_period['status'])) {
420 420
 		// If no unlocked record and period still open
421
-		$button = '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=step_2&token='.newToken().'&fiscal_period_id=' . $current_fiscal_period['id'] . '">' . $langs->trans("AccountancyClosureClose") . '</a>';
421
+		$button = '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=step_2&token='.newToken().'&fiscal_period_id='.$current_fiscal_period['id'].'">'.$langs->trans("AccountancyClosureClose").'</a>';
422 422
 	} else {
423 423
 		if (!empty($current_fiscal_period['status'])) {
424
-			$button = '<a class="butActionRefused classfortooltip" href="#" title="The period is already closed. Feature disabled.">' . $langs->trans("AccountancyClosureClose") . '</a>';
424
+			$button = '<a class="butActionRefused classfortooltip" href="#" title="The period is already closed. Feature disabled.">'.$langs->trans("AccountancyClosureClose").'</a>';
425 425
 		} elseif (!empty($count_by_month['total'])) {
426
-			$button = '<a class="butActionRefused classfortooltip" href="#" title="There is some lines not yet locked. Feature disabled.">' . $langs->trans("AccountancyClosureClose") . '</a>';
426
+			$button = '<a class="butActionRefused classfortooltip" href="#" title="There is some lines not yet locked. Feature disabled.">'.$langs->trans("AccountancyClosureClose").'</a>';
427 427
 		}
428 428
 	}
429 429
 	print_barre_liste('', 0, '', '', '', '', '', -1, '', '', 0, $button, '', 0, 1, 0);
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
 
433 433
 	// Step 3
434 434
 	$head = array();
435
-	$head[0][0] = DOL_URL_ROOT . '/accountancy/closure/index.php?fiscal_period_id=' . $current_fiscal_period['id'];
435
+	$head[0][0] = DOL_URL_ROOT.'/accountancy/closure/index.php?fiscal_period_id='.$current_fiscal_period['id'];
436 436
 	$head[0][1] = $langs->trans("Step").(getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE") ? '2' : '3').' - '.$langs->trans("AccountancyClosureStep3");
437 437
 	$head[0][2] = 'step3';
438 438
 	print dol_get_fiche_head($head, 'step3', '', -1, '');
@@ -440,9 +440,9 @@  discard block
 block discarded – undo
440 440
 	// print '<span class="opacitymedium">' . $langs->trans("AccountancyClosureStep3Desc") . '</span><br>';
441 441
 
442 442
 	if (empty($current_fiscal_period['status'])) {
443
-		$button = '<a class="butActionRefused classfortooltip" href="#">' . $langs->trans("AccountancyClosureAccountingReversal") . '</a>';
443
+		$button = '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans("AccountancyClosureAccountingReversal").'</a>';
444 444
 	} else {
445
-		$button = '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=step_3&token='.newToken().'&fiscal_period_id=' . $current_fiscal_period['id'] . '">' . $langs->trans("AccountancyClosureAccountingReversal") . '</a>';
445
+		$button = '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=step_3&token='.newToken().'&fiscal_period_id='.$current_fiscal_period['id'].'">'.$langs->trans("AccountancyClosureAccountingReversal").'</a>';
446 446
 	}
447 447
 	print_barre_liste('', 0, '', '', '', '', '', -1, '', '', 0, $button, '', 0, 1, 0);
448 448
 }
Please login to merge, or discard this patch.