Test Failed
Push — main ( 9d38ca...840cfb )
by Rafael
06:02
created
htdocs/index_dol.php 1 patch
Spacing   +114 added lines, -114 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@  discard block
 block discarded – undo
25 25
  *	\brief      Dolibarr home page
26 26
  */
27 27
 
28
-define('CSRFCHECK_WITH_TOKEN', 1);	// We force need to use a token to login when making a POST
28
+define('CSRFCHECK_WITH_TOKEN', 1); // We force need to use a token to login when making a POST
29 29
 
30 30
 require 'main.inc.php';
31
-require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
31
+require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
32 32
 
33 33
 // If not defined, we select menu "home"
34 34
 $_GET['mainmenu'] = GETPOST('mainmenu', 'aZ09') ? GETPOST('mainmenu', 'aZ09') : 'home';
@@ -42,15 +42,15 @@  discard block
 block discarded – undo
42 42
 
43 43
 // Check if company name is defined (first install)
44 44
 if (!isset($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_NOM)) {
45
-	header("Location: ".DOL_URL_ROOT."/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete");
45
+	header("Location: " . DOL_URL_ROOT . "/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete");
46 46
 	exit;
47 47
 }
48 48
 if (count($conf->modules) <= (empty($conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING) ? 1 : $conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)) {	// If only user module enabled
49
-	header("Location: ".DOL_URL_ROOT."/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete");
49
+	header("Location: " . DOL_URL_ROOT . "/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete");
50 50
 	exit;
51 51
 }
52 52
 if (GETPOST('addbox')) {	// Add box (when submit is done from a form when ajax disabled)
53
-	require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php';
53
+	require_once DOL_DOCUMENT_ROOT . '/core/class/infobox.class.php';
54 54
 	$zone = GETPOST('areacode', 'int');
55 55
 	$userid = GETPOST('userid', 'int');
56 56
 	$boxorder = GETPOST('boxorder', 'aZ09');
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
 }
73 73
 
74 74
 // Title
75
-$title = $langs->trans("HomeArea").' - Dolibarr '.DOL_VERSION;
75
+$title = $langs->trans("HomeArea") . ' - Dolibarr ' . DOL_VERSION;
76 76
 if (!empty($conf->global->MAIN_APPLICATION_TITLE)) {
77
-	$title = $langs->trans("HomeArea").' - '.$conf->global->MAIN_APPLICATION_TITLE;
77
+	$title = $langs->trans("HomeArea") . ' - ' . $conf->global->MAIN_APPLICATION_TITLE;
78 78
 }
79 79
 
80 80
 llxHeader('', $title);
@@ -109,11 +109,11 @@  discard block
 block discarded – undo
109 109
 	$message = '';
110 110
 
111 111
 	// Check if install lock file is present
112
-	$lockfile = DOL_DATA_ROOT.'/install.lock';
113
-	if (!empty($lockfile) && !file_exists($lockfile) && is_dir(DOL_DOCUMENT_ROOT."/install")) {
112
+	$lockfile = DOL_DATA_ROOT . '/install.lock';
113
+	if (!empty($lockfile) && !file_exists($lockfile) && is_dir(DOL_DOCUMENT_ROOT . "/install")) {
114 114
 		$langs->load("errors");
115 115
 		//if (! empty($message)) $message.='<br>';
116
-		$message .= info_admin($langs->trans("WarningLockFileDoesNotExists", DOL_DATA_ROOT).' '.$langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT."/install"), 0, 0, '1', 'clearboth');
116
+		$message .= info_admin($langs->trans("WarningLockFileDoesNotExists", DOL_DATA_ROOT) . ' ' . $langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT . "/install"), 0, 0, '1', 'clearboth');
117 117
 	}
118 118
 
119 119
 	// Conf files must be in read only mode
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 		$langs->load("errors");
122 122
 		//$langs->load("other");
123 123
 		//if (! empty($message)) $message.='<br>';
124
-		$message .= info_admin($langs->transnoentities("WarningConfFileMustBeReadOnly").' '.$langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT."/install"), 0, 0, '1', 'clearboth');
124
+		$message .= info_admin($langs->transnoentities("WarningConfFileMustBeReadOnly") . ' ' . $langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT . "/install"), 0, 0, '1', 'clearboth');
125 125
 	}
126 126
 
127 127
 	if ($message) {
@@ -151,97 +151,97 @@  discard block
 block discarded – undo
151 151
 	$dashboardlines = array();
152 152
 
153 153
 	// Do not include sections without management permission
154
-	require_once DOL_DOCUMENT_ROOT.'/core/class/workboardresponse.class.php';
154
+	require_once DOL_DOCUMENT_ROOT . '/core/class/workboardresponse.class.php';
155 155
 
156 156
 	// Number of actions to do (late)
157 157
 	if (!empty($conf->agenda->enabled) && $user->rights->agenda->myactions->read) {
158
-		include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
158
+		include_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php';
159 159
 		$board = new ActionComm($db);
160 160
 		$dashboardlines[$board->element] = $board->load_board($user);
161 161
 	}
162 162
 
163 163
 	// Number of project opened
164 164
 	if (!empty($conf->projet->enabled) && $user->rights->projet->lire) {
165
-		include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
165
+		include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
166 166
 		$board = new Project($db);
167 167
 		$dashboardlines[$board->element] = $board->load_board($user);
168 168
 	}
169 169
 
170 170
 	// Number of tasks to do (late)
171 171
 	if (!empty($conf->projet->enabled) && empty($conf->global->PROJECT_HIDE_TASKS) && $user->rights->projet->lire) {
172
-		include_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
172
+		include_once DOL_DOCUMENT_ROOT . '/projet/class/task.class.php';
173 173
 		$board = new Task($db);
174 174
 		$dashboardlines[$board->element] = $board->load_board($user);
175 175
 	}
176 176
 
177 177
 	// Number of commercial proposals open (expired)
178 178
 	if (!empty($conf->propal->enabled) && $user->rights->propale->lire) {
179
-		include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
179
+		include_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php';
180 180
 		$board = new Propal($db);
181
-		$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
181
+		$dashboardlines[$board->element . '_opened'] = $board->load_board($user, "opened");
182 182
 		// Number of commercial proposals CLOSED signed (billed)
183
-		$dashboardlines[$board->element.'_signed'] = $board->load_board($user, "signed");
183
+		$dashboardlines[$board->element . '_signed'] = $board->load_board($user, "signed");
184 184
 	}
185 185
 
186 186
 	// Number of commercial proposals open (expired)
187 187
 	if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) {
188
-		include_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
188
+		include_once DOL_DOCUMENT_ROOT . '/supplier_proposal/class/supplier_proposal.class.php';
189 189
 		$board = new SupplierProposal($db);
190
-		$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
190
+		$dashboardlines[$board->element . '_opened'] = $board->load_board($user, "opened");
191 191
 		// Number of commercial proposals CLOSED signed (billed)
192
-		$dashboardlines[$board->element.'_signed'] = $board->load_board($user, "signed");
192
+		$dashboardlines[$board->element . '_signed'] = $board->load_board($user, "signed");
193 193
 	}
194 194
 
195 195
 	// Number of customer orders a deal
196 196
 	if (!empty($conf->commande->enabled) && $user->rights->commande->lire) {
197
-		include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
197
+		include_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php';
198 198
 		$board = new Commande($db);
199 199
 		$dashboardlines[$board->element] = $board->load_board($user);
200 200
 	}
201 201
 
202 202
 	// Number of suppliers orders a deal
203 203
 	if (!empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire) {
204
-		include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
204
+		include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.commande.class.php';
205 205
 		$board = new CommandeFournisseur($db);
206
-		$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
207
-		$dashboardlines[$board->element.'_awaiting'] = $board->load_board($user, 'awaiting');
206
+		$dashboardlines[$board->element . '_opened'] = $board->load_board($user, "opened");
207
+		$dashboardlines[$board->element . '_awaiting'] = $board->load_board($user, 'awaiting');
208 208
 	}
209 209
 
210 210
 	// Number of contract / services enabled (delayed)
211 211
 	if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) {
212
-		include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
212
+		include_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php';
213 213
 		$board = new Contrat($db);
214
-		$dashboardlines[$board->element.'_inactive'] = $board->load_board($user, "inactive");
214
+		$dashboardlines[$board->element . '_inactive'] = $board->load_board($user, "inactive");
215 215
 		// Number of active services (expired)
216
-		$dashboardlines[$board->element.'_active'] = $board->load_board($user, "active");
216
+		$dashboardlines[$board->element . '_active'] = $board->load_board($user, "active");
217 217
 	}
218 218
 
219 219
 	// Number of tickets open
220 220
 	if (!empty($conf->ticket->enabled) && $user->rights->ticket->read) {
221
-		include_once DOL_DOCUMENT_ROOT.'/ticket/class/ticket.class.php';
221
+		include_once DOL_DOCUMENT_ROOT . '/ticket/class/ticket.class.php';
222 222
 		$board = new Ticket($db);
223
-		$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");
223
+		$dashboardlines[$board->element . '_opened'] = $board->load_board($user, "opened");
224 224
 		// Number of active services (expired)
225 225
 		//$dashboardlines[$board->element.'_active'] = $board->load_board($user, "active");
226 226
 	}
227 227
 
228 228
 	// Number of invoices customers (paid)
229 229
 	if (!empty($conf->facture->enabled) && $user->rights->facture->lire) {
230
-		include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
230
+		include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
231 231
 		$board = new Facture($db);
232 232
 		$dashboardlines[$board->element] = $board->load_board($user);
233 233
 	}
234 234
 
235 235
 	// Number of supplier invoices (paid)
236 236
 	if (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->fournisseur->facture->lire)) {
237
-		include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
237
+		include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
238 238
 		$board = new FactureFournisseur($db);
239 239
 		$dashboardlines[$board->element] = $board->load_board($user);
240 240
 	}
241 241
 
242 242
 	// Number of transactions to conciliate
243 243
 	if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->socid) {
244
-		include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
244
+		include_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php';
245 245
 		$board = new Account($db);
246 246
 		$nb = $board->countAccountToReconcile(); // Get nb of account to reconciliate
247 247
 		if ($nb > 0) {
@@ -251,36 +251,36 @@  discard block
 block discarded – undo
251 251
 
252 252
 	// Number of cheque to send
253 253
 	if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->socid && empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT)) {
254
-		include_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
254
+		include_once DOL_DOCUMENT_ROOT . '/compta/paiement/cheque/class/remisecheque.class.php';
255 255
 		$board = new RemiseCheque($db);
256 256
 		$dashboardlines[$board->element] = $board->load_board($user);
257 257
 	}
258 258
 
259 259
 	// Number of foundation members
260 260
 	if (!empty($conf->adherent->enabled) && $user->rights->adherent->lire && !$user->socid) {
261
-		include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
261
+		include_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
262 262
 		$board = new Adherent($db);
263
-		$dashboardlines[$board->element.'_shift'] = $board->load_board($user, 'shift');
264
-		$dashboardlines[$board->element.'_expired'] = $board->load_board($user, 'expired');
263
+		$dashboardlines[$board->element . '_shift'] = $board->load_board($user, 'shift');
264
+		$dashboardlines[$board->element . '_expired'] = $board->load_board($user, 'expired');
265 265
 	}
266 266
 
267 267
 	// Number of expense reports to approve
268 268
 	if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->approve) {
269
-		include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
269
+		include_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
270 270
 		$board = new ExpenseReport($db);
271
-		$dashboardlines[$board->element.'_toapprove'] = $board->load_board($user, 'toapprove');
271
+		$dashboardlines[$board->element . '_toapprove'] = $board->load_board($user, 'toapprove');
272 272
 	}
273 273
 
274 274
 	// Number of expense reports to pay
275 275
 	if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->to_paid) {
276
-		include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
276
+		include_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
277 277
 		$board = new ExpenseReport($db);
278
-		$dashboardlines[$board->element.'_topay'] = $board->load_board($user, 'topay');
278
+		$dashboardlines[$board->element . '_topay'] = $board->load_board($user, 'topay');
279 279
 	}
280 280
 
281 281
 	// Number of holidays to approve
282 282
 	if (!empty($conf->holiday->enabled) && $user->rights->holiday->approve) {
283
-		include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
283
+		include_once DOL_DOCUMENT_ROOT . '/holiday/class/holiday.class.php';
284 284
 		$board = new Holiday($db);
285 285
 		$dashboardlines[$board->element] = $board->load_board($user);
286 286
 	}
@@ -443,25 +443,25 @@  discard block
 block discarded – undo
443 443
 
444 444
 	$boxwork = '';
445 445
 	$boxwork .= '<div class="box">';
446
-	$boxwork .= '<table summary="'.dol_escape_htmltag($langs->trans("WorkingBoard")).'" class="noborder boxtable boxtablenobottom boxworkingboard centpercent">'."\n";
446
+	$boxwork .= '<table summary="' . dol_escape_htmltag($langs->trans("WorkingBoard")) . '" class="noborder boxtable boxtablenobottom boxworkingboard centpercent">' . "\n";
447 447
 	$boxwork .= '<tr class="liste_titre">';
448
-	$boxwork .= '<th class="liste_titre"><div class="inline-block valignmiddle">'.$langs->trans("DolibarrWorkBoard").'</div>';
448
+	$boxwork .= '<th class="liste_titre"><div class="inline-block valignmiddle">' . $langs->trans("DolibarrWorkBoard") . '</div>';
449 449
 	if ($showweather) {
450 450
 		if ($totallate > 0) {
451
-			$text = $langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate").' ('.$langs->transnoentitiesnoconv(
451
+			$text = $langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate") . ' (' . $langs->transnoentitiesnoconv(
452 452
 				"NActionsLate",
453
-				$totallate.(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ? '%' : '')
454
-			).')';
453
+				$totallate . (!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ? '%' : '')
454
+			) . ')';
455 455
 		} else {
456 456
 			$text = $langs->transnoentitiesnoconv("NoItemLate");
457 457
 		}
458
-		$text .= '. '.$langs->transnoentitiesnoconv("LateDesc");
458
+		$text .= '. ' . $langs->transnoentitiesnoconv("LateDesc");
459 459
 		//$text.=$form->textwithpicto('',$langs->trans("LateDesc"));
460 460
 		$options = 'height="24px" style="float: right"';
461 461
 		$boxwork .= showWeather($totallate, $text, $options, 'inline-block valignmiddle');
462 462
 	}
463 463
 	$boxwork .= '</th>';
464
-	$boxwork .= '</tr>'."\n";
464
+	$boxwork .= '</tr>' . "\n";
465 465
 
466 466
 	// Show dashboard
467 467
 	$nbworkboardempty = 0;
@@ -502,52 +502,52 @@  discard block
 block discarded – undo
502 502
 							$groupElement['globalStats']['total'] = $boardloaded[$classe]->nb[$globalStatsKey] ? $boardloaded[$classe]->nb[$globalStatsKey] : 0;
503 503
 							$nbTotal = floatval($groupElement['globalStats']['total']);
504 504
 							if ($nbTotal >= 10000) {
505
-								$nbTotal = round($nbTotal / 1000, 2).'k';
505
+								$nbTotal = round($nbTotal / 1000, 2) . 'k';
506 506
 							}
507
-							$groupElement['globalStats']['text'] = $langs->trans('Total').' : '.$langs->trans($titres[$keyIndex]).' ('.$groupElement['globalStats']['total'].')';
507
+							$groupElement['globalStats']['text'] = $langs->trans('Total') . ' : ' . $langs->trans($titres[$keyIndex]) . ' (' . $groupElement['globalStats']['total'] . ')';
508 508
 							$groupElement['globalStats']['total'] = $nbTotal;
509 509
 							$groupElement['globalStats']['link'] = $links[$keyIndex];
510 510
 						}
511 511
 					}
512 512
 				}
513 513
 
514
-				$openedDashBoard .= '<div class="box-flex-item"><div class="box-flex-item-with-margin">'."\n";
515
-				$openedDashBoard .= '	<div class="info-box '.$openedDashBoardSize.'">'."\n";
516
-				$openedDashBoard .= '		<span class="info-box-icon bg-infobox-'.$groupKeyLowerCase.'">'."\n";
517
-				$openedDashBoard .= '		<i class="fa fa-dol-'.$groupKeyLowerCase.'"></i>'."\n";
514
+				$openedDashBoard .= '<div class="box-flex-item"><div class="box-flex-item-with-margin">' . "\n";
515
+				$openedDashBoard .= '	<div class="info-box ' . $openedDashBoardSize . '">' . "\n";
516
+				$openedDashBoard .= '		<span class="info-box-icon bg-infobox-' . $groupKeyLowerCase . '">' . "\n";
517
+				$openedDashBoard .= '		<i class="fa fa-dol-' . $groupKeyLowerCase . '"></i>' . "\n";
518 518
 
519 519
 				// Show the span for the total of record
520 520
 				if (!empty($groupElement['globalStats'])) {
521 521
 					$globalStatInTopOpenedDashBoard[] = $globalStatsKey;
522
-					$openedDashBoard .= '<span class="info-box-icon-text" title="'.$groupElement['globalStats']['text'].'">'.$nbTotal.'</span>';
522
+					$openedDashBoard .= '<span class="info-box-icon-text" title="' . $groupElement['globalStats']['text'] . '">' . $nbTotal . '</span>';
523 523
 				}
524 524
 
525
-				$openedDashBoard .= '</span>'."\n";
526
-				$openedDashBoard .= '<div class="info-box-content">'."\n";
525
+				$openedDashBoard .= '</span>' . "\n";
526
+				$openedDashBoard .= '<div class="info-box-content">' . "\n";
527 527
 
528
-				$openedDashBoard .= '<div class="info-box-title" title="'.strip_tags($groupName).'">'.$groupName.'</div>'."\n";
529
-				$openedDashBoard .= '<div class="info-box-lines">'."\n";
528
+				$openedDashBoard .= '<div class="info-box-title" title="' . strip_tags($groupName) . '">' . $groupName . '</div>' . "\n";
529
+				$openedDashBoard .= '<div class="info-box-lines">' . "\n";
530 530
 
531 531
 				foreach ($boards as $board) {
532 532
 					$openedDashBoard .= '<div class="info-box-line">';
533 533
 
534 534
 					if (!empty($board->labelShort)) {
535
-						$infoName = '<span title="'.$board->label.'">'.$board->labelShort.'</span>';
535
+						$infoName = '<span title="' . $board->label . '">' . $board->labelShort . '</span>';
536 536
 					} else {
537 537
 						$infoName = $board->label;
538 538
 					}
539 539
 
540 540
 					$textLateTitle = $langs->trans("NActionsLate", $board->nbtodolate);
541
-					$textLateTitle .= ' ('.$langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($board->warning_delay) >= 0 ? '+' : '').ceil($board->warning_delay).' '.$langs->trans("days").')';
541
+					$textLateTitle .= ' (' . $langs->trans("Late") . ' = ' . $langs->trans("DateReference") . ' > ' . $langs->trans("DateToday") . ' ' . (ceil($board->warning_delay) >= 0 ? '+' : '') . ceil($board->warning_delay) . ' ' . $langs->trans("days") . ')';
542 542
 
543 543
 					if ($board->id == 'bank_account') {
544
-						$textLateTitle .= '<br><span class="opacitymedium">'.$langs->trans("IfYouDontReconcileDisableProperty", $langs->transnoentitiesnoconv("Conciliable")).'</span>';
544
+						$textLateTitle .= '<br><span class="opacitymedium">' . $langs->trans("IfYouDontReconcileDisableProperty", $langs->transnoentitiesnoconv("Conciliable")) . '</span>';
545 545
 					}
546 546
 
547 547
 					$textLate = '';
548 548
 					if ($board->nbtodolate > 0) {
549
-						$textLate .= '<span title="'.dol_escape_htmltag($textLateTitle).'" class="classfortooltip badge badge-warning">';
550
-						$textLate .= '<i class="fa fa-exclamation-triangle"></i> '.$board->nbtodolate;
549
+						$textLate .= '<span title="' . dol_escape_htmltag($textLateTitle) . '" class="classfortooltip badge badge-warning">';
550
+						$textLate .= '<i class="fa fa-exclamation-triangle"></i> ' . $board->nbtodolate;
551 551
 						$textLate .= '</span>';
552 552
 					}
553 553
 
@@ -556,30 +556,30 @@  discard block
 block discarded – undo
556 556
 						$nbtodClass = 'badge badge-info';
557 557
 					}
558 558
 
559
-					$openedDashBoard .= '			<a href="'.$board->url.'" class="info-box-text info-box-text-a">'.$infoName.' : <span class="'.$nbtodClass.' classfortooltip" title="'.$board->label.'" >'.$board->nbtodo.'</span>';
559
+					$openedDashBoard .= '			<a href="' . $board->url . '" class="info-box-text info-box-text-a">' . $infoName . ' : <span class="' . $nbtodClass . ' classfortooltip" title="' . $board->label . '" >' . $board->nbtodo . '</span>';
560 560
 					if ($textLate) {
561 561
 						if ($board->url_late) {
562 562
 							$openedDashBoard .= '</a>';
563
-							$openedDashBoard .= ' <a href="'.$board->url_late.'" class="info-box-text info-box-text-a paddingleft">';
563
+							$openedDashBoard .= ' <a href="' . $board->url_late . '" class="info-box-text info-box-text-a paddingleft">';
564 564
 						} else {
565 565
 							$openedDashBoard .= ' ';
566 566
 						}
567 567
 						$openedDashBoard .= $textLate;
568 568
 					}
569
-					$openedDashBoard .= '</a>'."\n";
569
+					$openedDashBoard .= '</a>' . "\n";
570 570
 
571 571
 					if ($board->total > 0 && !empty($conf->global->MAIN_WORKBOARD_SHOW_TOTAL_WO_TAX)) {
572
-						$openedDashBoard .= '<a href="'.$board->url.'" class="info-box-text">'.$langs->trans('Total').' : '.price($board->total).'</a>';
572
+						$openedDashBoard .= '<a href="' . $board->url . '" class="info-box-text">' . $langs->trans('Total') . ' : ' . price($board->total) . '</a>';
573 573
 					}
574
-					$openedDashBoard .= '</div>'."\n";
574
+					$openedDashBoard .= '</div>' . "\n";
575 575
 				}
576 576
 
577 577
 				// TODO Add hook here to add more "info-box-line"
578 578
 
579
-				$openedDashBoard .= '		</div><!-- /.info-box-lines --></div><!-- /.info-box-content -->'."\n";
580
-				$openedDashBoard .= '	</div><!-- /.info-box -->'."\n";
581
-				$openedDashBoard .= '</div><!-- /.box-flex-item-with-margin -->'."\n";
582
-				$openedDashBoard .= '</div><!-- /.box-flex-item -->'."\n";
579
+				$openedDashBoard .= '		</div><!-- /.info-box-lines --></div><!-- /.info-box-content -->' . "\n";
580
+				$openedDashBoard .= '	</div><!-- /.info-box -->' . "\n";
581
+				$openedDashBoard .= '</div><!-- /.box-flex-item-with-margin -->' . "\n";
582
+				$openedDashBoard .= '</div><!-- /.box-flex-item -->' . "\n";
583 583
 				$openedDashBoard .= "\n";
584 584
 			}
585 585
 		}
@@ -590,52 +590,52 @@  discard block
 block discarded – undo
590 590
 
591 591
 			$text = '';
592 592
 			if ($totallate > 0) {
593
-				$text = $langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate").' ('.$langs->transnoentitiesnoconv(
593
+				$text = $langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate") . ' (' . $langs->transnoentitiesnoconv(
594 594
 					"NActionsLate",
595
-					$totallate.(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ? '%' : '')
596
-				).')';
595
+					$totallate . (!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ? '%' : '')
596
+				) . ')';
597 597
 			} else {
598 598
 				$text = $langs->transnoentitiesnoconv("NoItemLate");
599 599
 			}
600
-			$text .= '. '.$langs->transnoentitiesnoconv("LateDesc");
600
+			$text .= '. ' . $langs->transnoentitiesnoconv("LateDesc");
601 601
 
602
-			$weatherDashBoard = '<div class="box-flex-item '.$appendClass.'"><div class="box-flex-item-with-margin">'."\n";
603
-			$weatherDashBoard .= '	<div class="info-box '.$openedDashBoardSize.' info-box-weather info-box-weather-level'.$weather->level.'">'."\n";
602
+			$weatherDashBoard = '<div class="box-flex-item ' . $appendClass . '"><div class="box-flex-item-with-margin">' . "\n";
603
+			$weatherDashBoard .= '	<div class="info-box ' . $openedDashBoardSize . ' info-box-weather info-box-weather-level' . $weather->level . '">' . "\n";
604 604
 			$weatherDashBoard .= '		<span class="info-box-icon">';
605 605
 			$weatherDashBoard .= img_weather('', $weather->level, '', 0, 'valignmiddle width50');
606
-			$weatherDashBoard .= '       </span>'."\n";
607
-			$weatherDashBoard .= '		<div class="info-box-content">'."\n";
608
-			$weatherDashBoard .= '			<div class="info-box-title">'.$langs->trans('GlobalOpenedElemView').'</div>'."\n";
606
+			$weatherDashBoard .= '       </span>' . "\n";
607
+			$weatherDashBoard .= '		<div class="info-box-content">' . "\n";
608
+			$weatherDashBoard .= '			<div class="info-box-title">' . $langs->trans('GlobalOpenedElemView') . '</div>' . "\n";
609 609
 
610 610
 			if ($totallatePercentage > 0 && !empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) {
611
-				$weatherDashBoard .= '			<span class="info-box-number">'.$langs->transnoentitiesnoconv(
611
+				$weatherDashBoard .= '			<span class="info-box-number">' . $langs->transnoentitiesnoconv(
612 612
 					"NActionsLate",
613
-					price($totallatePercentage).'%'
614
-				).'</span>'."\n";
615
-				$weatherDashBoard .= '			<span class="progress-description">'.$langs->trans(
613
+					price($totallatePercentage) . '%'
614
+				) . '</span>' . "\n";
615
+				$weatherDashBoard .= '			<span class="progress-description">' . $langs->trans(
616 616
 					'NActionsLate',
617 617
 					$totalLateNumber
618
-				).'</span>'."\n";
618
+				) . '</span>' . "\n";
619 619
 			} else {
620
-				$weatherDashBoard .= '			<span class="info-box-number">'.$langs->transnoentitiesnoconv(
620
+				$weatherDashBoard .= '			<span class="info-box-number">' . $langs->transnoentitiesnoconv(
621 621
 					"NActionsLate",
622 622
 					$totalLateNumber
623
-				).'</span>'."\n";
623
+				) . '</span>' . "\n";
624 624
 				if ($totallatePercentage > 0) {
625
-					$weatherDashBoard .= '			<span class="progress-description">'.$langs->trans(
625
+					$weatherDashBoard .= '			<span class="progress-description">' . $langs->trans(
626 626
 						'NActionsLate',
627
-						price($totallatePercentage).'%'
628
-					).'</span>'."\n";
627
+						price($totallatePercentage) . '%'
628
+					) . '</span>' . "\n";
629 629
 				}
630 630
 			}
631 631
 
632
-			$weatherDashBoard .= '		</div><!-- /.info-box-content -->'."\n";
633
-			$weatherDashBoard .= '	</div><!-- /.info-box -->'."\n";
634
-			$weatherDashBoard .= '</div><!-- /.box-flex-item-with-margin -->'."\n";
635
-			$weatherDashBoard .= '</div><!-- /.box-flex-item -->'."\n";
632
+			$weatherDashBoard .= '		</div><!-- /.info-box-content -->' . "\n";
633
+			$weatherDashBoard .= '	</div><!-- /.info-box -->' . "\n";
634
+			$weatherDashBoard .= '</div><!-- /.box-flex-item-with-margin -->' . "\n";
635
+			$weatherDashBoard .= '</div><!-- /.box-flex-item -->' . "\n";
636 636
 			$weatherDashBoard .= "\n";
637 637
 
638
-			$openedDashBoard = $weatherDashBoard.$openedDashBoard;
638
+			$openedDashBoard = $weatherDashBoard . $openedDashBoard;
639 639
 		}
640 640
 
641 641
 		if (!empty($isIntopOpenedDashBoard)) {
@@ -658,27 +658,27 @@  discard block
 block discarded – undo
658 658
 
659 659
 
660 660
 			$textlate = $langs->trans("NActionsLate", $board->nbtodolate);
661
-			$textlate .= ' ('.$langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($board->warning_delay) >= 0 ? '+' : '').ceil($board->warning_delay).' '.$langs->trans("days").')';
661
+			$textlate .= ' (' . $langs->trans("Late") . ' = ' . $langs->trans("DateReference") . ' > ' . $langs->trans("DateToday") . ' ' . (ceil($board->warning_delay) >= 0 ? '+' : '') . ceil($board->warning_delay) . ' ' . $langs->trans("days") . ')';
662 662
 
663 663
 
664 664
 			$boxwork .= '<div class="boxstatsindicator thumbstat150 nobold nounderline"><div class="boxstats130 boxstatsborder">';
665 665
 			$boxwork .= '<div class="boxstatscontent">';
666
-			$boxwork .= '<span class="boxstatstext" title="'.dol_escape_htmltag($board->label).'">'.$board->img.' <span>'.$board->label.'</span></span><br>';
667
-			$boxwork .= '<a class="valignmiddle dashboardlineindicator" href="'.$board->url.'"><span class="dashboardlineindicator'.(($board->nbtodo == 0) ? ' dashboardlineok' : '').'">'.$board->nbtodo.'</span></a>';
666
+			$boxwork .= '<span class="boxstatstext" title="' . dol_escape_htmltag($board->label) . '">' . $board->img . ' <span>' . $board->label . '</span></span><br>';
667
+			$boxwork .= '<a class="valignmiddle dashboardlineindicator" href="' . $board->url . '"><span class="dashboardlineindicator' . (($board->nbtodo == 0) ? ' dashboardlineok' : '') . '">' . $board->nbtodo . '</span></a>';
668 668
 			if ($board->total > 0 && !empty($conf->global->MAIN_WORKBOARD_SHOW_TOTAL_WO_TAX)) {
669
-				$boxwork .= '&nbsp;/&nbsp;<a class="valignmiddle dashboardlineindicator" href="'.$board->url.'"><span class="dashboardlineindicator'.(($board->nbtodo == 0) ? ' dashboardlineok' : '').'">'.price($board->total).'</span></a>';
669
+				$boxwork .= '&nbsp;/&nbsp;<a class="valignmiddle dashboardlineindicator" href="' . $board->url . '"><span class="dashboardlineindicator' . (($board->nbtodo == 0) ? ' dashboardlineok' : '') . '">' . price($board->total) . '</span></a>';
670 670
 			}
671 671
 			$boxwork .= '</div>';
672 672
 			if ($board->nbtodolate > 0) {
673 673
 				$boxwork .= '<div class="dashboardlinelatecoin nowrap">';
674
-				$boxwork .= '<a title="'.dol_escape_htmltag($textlate).'" class="valignmiddle dashboardlineindicatorlate'.($board->nbtodolate > 0 ? ' dashboardlineko' : ' dashboardlineok').'" href="'.((!$board->url_late) ? $board->url : $board->url_late).'">';
674
+				$boxwork .= '<a title="' . dol_escape_htmltag($textlate) . '" class="valignmiddle dashboardlineindicatorlate' . ($board->nbtodolate > 0 ? ' dashboardlineko' : ' dashboardlineok') . '" href="' . ((!$board->url_late) ? $board->url : $board->url_late) . '">';
675 675
 				//$boxwork .= img_picto($textlate, "warning_white", 'class="valigntextbottom"').'';
676 676
 				$boxwork .= img_picto(
677 677
 					$textlate,
678 678
 					"warning_white",
679 679
 					'class="inline-block hideonsmartphone valigntextbottom"'
680
-				).'';
681
-				$boxwork .= '<span class="dashboardlineindicatorlate'.($board->nbtodolate > 0 ? ' dashboardlineko' : ' dashboardlineok').'">';
680
+				) . '';
681
+				$boxwork .= '<span class="dashboardlineindicatorlate' . ($board->nbtodolate > 0 ? ' dashboardlineko' : ' dashboardlineok') . '">';
682 682
 				$boxwork .= $board->nbtodolate;
683 683
 				$boxwork .= '</span>';
684 684
 				$boxwork .= '</a>';
@@ -710,7 +710,7 @@  discard block
 block discarded – undo
710 710
 
711 711
 	if (!empty($isIntopOpenedDashBoard)) {
712 712
 		print '<div class="fichecenter">';
713
-		print '<div class="opened-dash-board-wrap"><div class="box-flex-container">'.$openedDashBoard.'</div></div>';
713
+		print '<div class="opened-dash-board-wrap"><div class="box-flex-container">' . $openedDashBoard . '</div></div>';
714 714
 		print '</div>';
715 715
 	}
716 716
 }
@@ -797,20 +797,20 @@  discard block
 block discarded – undo
797 797
 
798 798
 	$level0 = $offset;
799 799
 	$weather->level = 0;
800
-	if (!empty($conf->global->{$used_conf.'0'})) {
801
-		$level0 = $conf->global->{$used_conf.'0'};
800
+	if (!empty($conf->global->{$used_conf . '0'})) {
801
+		$level0 = $conf->global->{$used_conf . '0'};
802 802
 	}
803 803
 	$level1 = $offset + 1 * $factor;
804
-	if (!empty($conf->global->{$used_conf.'1'})) {
805
-		$level1 = $conf->global->{$used_conf.'1'};
804
+	if (!empty($conf->global->{$used_conf . '1'})) {
805
+		$level1 = $conf->global->{$used_conf . '1'};
806 806
 	}
807 807
 	$level2 = $offset + 2 * $factor;
808
-	if (!empty($conf->global->{$used_conf.'2'})) {
809
-		$level2 = $conf->global->{$used_conf.'2'};
808
+	if (!empty($conf->global->{$used_conf . '2'})) {
809
+		$level2 = $conf->global->{$used_conf . '2'};
810 810
 	}
811 811
 	$level3 = $offset + 3 * $factor;
812
-	if (!empty($conf->global->{$used_conf.'3'})) {
813
-		$level3 = $conf->global->{$used_conf.'3'};
812
+	if (!empty($conf->global->{$used_conf . '3'})) {
813
+		$level3 = $conf->global->{$used_conf . '3'};
814 814
 	}
815 815
 
816 816
 	if ($totallate <= $level0) {
Please login to merge, or discard this patch.
htdocs/Core/DebugBarCollectors/PhpCollector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
     {
65 65
         $messages = $this->messages;
66 66
 
67
-        usort($messages, function ($itemA, $itemB) {
67
+        usort($messages, function($itemA, $itemB) {
68 68
             if ($itemA['time'] === $itemB['time']) {
69 69
                 return 0;
70 70
             }
Please login to merge, or discard this patch.
htdocs/Core/Utils/FileSystemUtils.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
         $modules = [];
109 109
         foreach (ModuleManager::getEnabledModules() as $value) {
110 110
             $cad = $value['path'];
111
-            $modules[] = substr($cad, strlen('src/'));    // Delete initial 'src\'
111
+            $modules[] = substr($cad, strlen('src/')); // Delete initial 'src\'
112 112
         }
113 113
         $modules[] = 'Alxarafe\Core';
114 114
         foreach ($modules as $module) {
Please login to merge, or discard this patch.
htdocs/Core/Helpers/Auth.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,8 +124,8 @@
 block discarded – undo
124 124
      */
125 125
     public function setUser($user, $password)
126 126
     {
127
-        $username_field = 'login';  // Alxarafe use 'username', but Dolibarr use 'login'
128
-        $password_field = 'pass_crypted';  // Alxarafe use 'password', but Dolibarr use 'pass_crypted'
127
+        $username_field = 'login'; // Alxarafe use 'username', but Dolibarr use 'login'
128
+        $password_field = 'pass_crypted'; // Alxarafe use 'password', but Dolibarr use 'pass_crypted'
129 129
         $encrypt_method = "password_hash"; // Alxarafe use 'md5', but Dolibarr use a function called dol_hash
130 130
 
131 131
         $_user = Engine::select("SELECT * FROM {$this->users->tableName} WHERE $username_field='$user';");
Please login to merge, or discard this patch.