Completed
Branch develop (bc8e4c)
by
unknown
14:01
created
htdocs/webportal/controllers/membercard.controller.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
  * \brief       This file is a controller for member card
24 24
  */
25 25
 
26
-require_once DOL_DOCUMENT_ROOT . '/webportal/class/html.formcardwebportal.class.php';
26
+require_once DOL_DOCUMENT_ROOT.'/webportal/class/html.formcardwebportal.class.php';
27 27
 
28 28
 /**
29 29
  * Class for MemberCardController
Please login to merge, or discard this patch.
htdocs/webportal/controllers/default.controller.class.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@
 block discarded – undo
17 17
  */
18 18
 
19 19
  /**
20
- * \file        htdocs/webportal/controllers/default.controller.class.php
21
- * \ingroup     webportal
22
- * \brief       This file is a controller for default
23
- */
20
+  * \file        htdocs/webportal/controllers/default.controller.class.php
21
+  * \ingroup     webportal
22
+  * \brief       This file is a controller for default
23
+  */
24 24
 
25 25
 /**
26 26
  * Class for DefaultController
Please login to merge, or discard this patch.
htdocs/webportal/controllers/propallist.controller.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
  * \brief       This file is a controller for propal list
24 24
  */
25 25
 
26
-require_once DOL_DOCUMENT_ROOT . '/webportal/class/html.formlistwebportal.class.php';
26
+require_once DOL_DOCUMENT_ROOT.'/webportal/class/html.formlistwebportal.class.php';
27 27
 
28 28
 /**
29 29
  * Class for PropalListController
Please login to merge, or discard this patch.
htdocs/webportal/controllers/login.controller.class.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@
 block discarded – undo
17 17
  */
18 18
 
19 19
  /**
20
- * \file        htdocs/webportal/controllers/login.controller.class.php
21
- * \ingroup     webportal
22
- * \brief       This file is a controller for login
23
- */
20
+  * \file        htdocs/webportal/controllers/login.controller.class.php
21
+  * \ingroup     webportal
22
+  * \brief       This file is a controller for login
23
+  */
24 24
 /**
25
- * Class for LoginController
26
- */
25
+  * Class for LoginController
26
+  */
27 27
 class LoginController extends Controller
28 28
 {
29 29
 	/**
Please login to merge, or discard this patch.
htdocs/webportal/controllers/partnershipcard.controller.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
  * \brief       This file is a controller for partnership card
24 24
  */
25 25
 
26
-require_once DOL_DOCUMENT_ROOT . '/webportal/class/html.formcardwebportal.class.php';
26
+require_once DOL_DOCUMENT_ROOT.'/webportal/class/html.formcardwebportal.class.php';
27 27
 
28 28
 /**
29 29
  * Class for PartnershipCardController
Please login to merge, or discard this patch.
htdocs/webportal/controllers/orderlist.controller.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
  * \brief       This file is a controller for order list
24 24
  */
25 25
 
26
-require_once DOL_DOCUMENT_ROOT . '/webportal/class/html.formlistwebportal.class.php';
26
+require_once DOL_DOCUMENT_ROOT.'/webportal/class/html.formlistwebportal.class.php';
27 27
 
28 28
 /**
29 29
  * Class for OrderListController
Please login to merge, or discard this patch.
htdocs/webportal/class/html.formlistwebportal.class.php 1 patch
Spacing   +76 added lines, -76 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
  * \brief      File of class with all html predefined components for WebPortal
27 27
  */
28 28
 
29
-require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
30
-require_once DOL_DOCUMENT_ROOT . '/core/class/discount.class.php';
31
-require_once DOL_DOCUMENT_ROOT . '/webportal/class/html.formwebportal.class.php';
29
+require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
30
+require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
31
+require_once DOL_DOCUMENT_ROOT.'/webportal/class/html.formwebportal.class.php';
32 32
 
33 33
 /**
34 34
  *    Class to manage generation of HTML components
@@ -135,10 +135,10 @@  discard block
 block discarded – undo
135 135
 		}
136 136
 
137 137
 		// load module libraries
138
-		dol_include_once('/webportal/class/webportal' . $elementEn . '.class.php');
138
+		dol_include_once('/webportal/class/webportal'.$elementEn.'.class.php');
139 139
 
140 140
 		// Initialize technical objects
141
-		$objectclass = 'WebPortal' . ucfirst($elementEn);
141
+		$objectclass = 'WebPortal'.ucfirst($elementEn);
142 142
 		$object = new $objectclass($this->db);
143 143
 
144 144
 		// set form list
@@ -148,18 +148,18 @@  discard block
 block discarded – undo
148 148
 		$this->sortfield = GETPOST('sortfield', 'aZ09comma');
149 149
 		$this->sortorder = GETPOST('sortorder', 'aZ09comma');
150 150
 		$this->page = GETPOSTISSET('page') ? GETPOSTINT('page') : 1;
151
-		$this->titleKey = $objectclass . 'ListTitle';
151
+		$this->titleKey = $objectclass.'ListTitle';
152 152
 
153 153
 		// Initialize array of search criteria
154 154
 		//$search_all = GETPOST('search_all', 'alphanohtml');
155 155
 		$search = array();
156 156
 		foreach ($object->fields as $key => $val) {
157
-			if (GETPOST('search_' . $key, 'alpha') !== '') {
158
-				$search[$key] = GETPOST('search_' . $key, 'alpha');
157
+			if (GETPOST('search_'.$key, 'alpha') !== '') {
158
+				$search[$key] = GETPOST('search_'.$key, 'alpha');
159 159
 			}
160 160
 			if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
161
-				$postDateStart = GETPOST('search_' . $key . '_dtstart', 'alphanohtml');
162
-				$postDateEnd = GETPOST('search_' . $key . '_dtend', 'alphanohtml');
161
+				$postDateStart = GETPOST('search_'.$key.'_dtstart', 'alphanohtml');
162
+				$postDateEnd = GETPOST('search_'.$key.'_dtend', 'alphanohtml');
163 163
 				// extract date YYYY-MM-DD for year, month and day
164 164
 				$dateStartArr = explode('-', $postDateStart);
165 165
 				$dateEndArr = explode('-', $postDateEnd);
@@ -167,13 +167,13 @@  discard block
 block discarded – undo
167 167
 					$dateStartYear = (int) $dateStartArr[0];
168 168
 					$dateStartMonth = (int) $dateStartArr[1];
169 169
 					$dateStartDay = (int) $dateStartArr[2];
170
-					$search[$key . '_dtstart'] = dol_mktime(0, 0, 0, $dateStartMonth, $dateStartDay, $dateStartYear);
170
+					$search[$key.'_dtstart'] = dol_mktime(0, 0, 0, $dateStartMonth, $dateStartDay, $dateStartYear);
171 171
 				}
172 172
 				if (count($dateEndArr) == 3) {
173 173
 					$dateEndYear = (int) $dateEndArr[0];
174 174
 					$dateEndMonth = (int) $dateEndArr[1];
175 175
 					$dateEndDay = (int) $dateEndArr[2];
176
-					$search[$key . '_dtend'] = dol_mktime(23, 59, 59, $dateEndMonth, $dateEndDay, $dateEndYear);
176
+					$search[$key.'_dtend'] = dol_mktime(23, 59, 59, $dateEndMonth, $dateEndDay, $dateEndYear);
177 177
 				}
178 178
 			}
179 179
 		}
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 			// If $val['visible']==0, then we never show the field
189 189
 			if (!empty($val['visible'])) {
190 190
 				$visible = (int) dol_eval($val['visible'], 1);
191
-				$arrayfields['t.' . $key] = array(
191
+				$arrayfields['t.'.$key] = array(
192 192
 					'label' => $val['label'],
193 193
 					'checked' => (($visible < 0) ? 0 : 1),
194 194
 					'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)),
@@ -224,8 +224,8 @@  discard block
 block discarded – undo
224 224
 			foreach ($object->fields as $key => $val) {
225 225
 				$search[$key] = '';
226 226
 				if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
227
-					$search[$key . '_dtstart'] = '';
228
-					$search[$key . '_dtend'] = '';
227
+					$search[$key.'_dtstart'] = '';
228
+					$search[$key.'_dtend'] = '';
229 229
 				}
230 230
 			}
231 231
 			$this->search = $search;
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 		$offset = $limit * ($page - 1);
281 281
 		if (!$sortfield) {
282 282
 			reset($object->fields); // Reset is required to avoid key() to return null.
283
-			$sortfield = 't.' . key($object->fields); // Set here default search field. By default 1st field in definition.
283
+			$sortfield = 't.'.key($object->fields); // Set here default search field. By default 1st field in definition.
284 284
 		}
285 285
 		if (!$sortorder) {
286 286
 			$sortorder = 'DESC';
@@ -299,18 +299,18 @@  discard block
 block discarded – undo
299 299
 
300 300
 		$sqlfields = $sql; // $sql fields to remove for count total
301 301
 
302
-		$sql .= " FROM " . $this->db->prefix() . $object->table_element . " as t";
302
+		$sql .= " FROM ".$this->db->prefix().$object->table_element." as t";
303 303
 		// Add table from hooks
304
-		$parameters = array();  // @phan-suppress-current-line PhanPluginRedundantAssignment
304
+		$parameters = array(); // @phan-suppress-current-line PhanPluginRedundantAssignment
305 305
 		$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
306 306
 		$sql .= $hookmanager->resPrint;
307 307
 		if ($object->ismultientitymanaged == 1) {
308
-			$sql .= " WHERE t.entity IN (" . getEntity($object->element, (GETPOSTINT('search_current_entity') ? 0 : 1)) . ")";
308
+			$sql .= " WHERE t.entity IN (".getEntity($object->element, (GETPOSTINT('search_current_entity') ? 0 : 1)).")";
309 309
 		} else {
310 310
 			$sql .= " WHERE 1 = 1";
311 311
 		}
312 312
 		// filter on logged third-party
313
-		$sql .= " AND t.fk_soc = " . (int) $context->logged_thirdparty->id;
313
+		$sql .= " AND t.fk_soc = ".(int) $context->logged_thirdparty->id;
314 314
 		foreach ($search as $key => $val) {
315 315
 			if (array_key_exists($key, $object->fields)) {
316 316
 				if (($key == 'status' || $key == 'fk_statut') && $search[$key] == $emptyValueKey) {
@@ -324,17 +324,17 @@  discard block
 block discarded – undo
324 324
 					$mode_search = 2;
325 325
 				}
326 326
 				if ($search[$key] != '') {
327
-					$sql .= natural_search("t." . $this->db->escape($key), $search[$key], (($key == 'status' || $key == 'fk_statut') ? ($search[$key] < 0 ? 1 : 2) : $mode_search));
327
+					$sql .= natural_search("t.".$this->db->escape($key), $search[$key], (($key == 'status' || $key == 'fk_statut') ? ($search[$key] < 0 ? 1 : 2) : $mode_search));
328 328
 				}
329 329
 			} else {
330 330
 				if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') {
331 331
 					$columnName = preg_replace('/(_dtstart|_dtend)$/', '', $key);
332 332
 					if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) {
333 333
 						if (preg_match('/_dtstart$/', $key)) {
334
-							$sql .= " AND t." . $this->db->escape($columnName) . " >= '" . $this->db->idate($search[$key]) . "'";
334
+							$sql .= " AND t.".$this->db->escape($columnName)." >= '".$this->db->idate($search[$key])."'";
335 335
 						}
336 336
 						if (preg_match('/_dtend$/', $key)) {
337
-							$sql .= " AND t." . $this->db->escape($columnName) . " <= '" . $this->db->idate($search[$key]) . "'";
337
+							$sql .= " AND t.".$this->db->escape($columnName)." <= '".$this->db->idate($search[$key])."'";
338 338
 						}
339 339
 					}
340 340
 				}
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 		//    $sql .= natural_search(array_keys($fieldstosearchall), $search_all);
345 345
 		//}
346 346
 		// Add where from hooks
347
-		$parameters = array();  // @phan-suppress-current-line PhanPluginRedundantAssignment
347
+		$parameters = array(); // @phan-suppress-current-line PhanPluginRedundantAssignment
348 348
 		$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
349 349
 		$sql .= $hookmanager->resPrint;
350 350
 
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
 		$nbtotalofrecords = 0;
353 353
 		if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
354 354
 			/* The fast and low memory method to get and count full list converts the sql into a sql count */
355
-			$sqlforcount = preg_replace('/^' . preg_quote($sqlfields, '/') . '/', 'SELECT COUNT(*) as nbtotalofrecords', $sql);
355
+			$sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql);
356 356
 			$sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount);
357 357
 			$resql = $this->db->query($sqlforcount);
358 358
 			if ($resql) {
@@ -405,52 +405,52 @@  discard block
 block discarded – undo
405 405
 		}
406 406
 
407 407
 		$param = '';
408
-		$param .= '&contextpage=' . urlencode($contextpage);
409
-		$param .= '&limit=' . $limit;
408
+		$param .= '&contextpage='.urlencode($contextpage);
409
+		$param .= '&limit='.$limit;
410 410
 		foreach ($search as $key => $val) {
411 411
 			if (is_array($search[$key])) {
412 412
 				foreach ($search[$key] as $skey) {
413 413
 					if ($skey != '') {
414
-						$param .= '&search_' . $key . '[]=' . urlencode($skey);
414
+						$param .= '&search_'.$key.'[]='.urlencode($skey);
415 415
 					}
416 416
 				}
417 417
 			} elseif (preg_match('/(_dtstart|_dtend)$/', $key) && !empty($val)) {
418
-				$param .= '&search_' . $key . 'month=' . (GETPOSTINT('search_' . $key . 'month'));
419
-				$param .= '&search_' . $key . 'day=' . (GETPOSTINT('search_' . $key . 'day'));
420
-				$param .= '&search_' . $key . 'year=' . (GETPOSTINT('search_' . $key . 'year'));
418
+				$param .= '&search_'.$key.'month='.(GETPOSTINT('search_'.$key.'month'));
419
+				$param .= '&search_'.$key.'day='.(GETPOSTINT('search_'.$key.'day'));
420
+				$param .= '&search_'.$key.'year='.(GETPOSTINT('search_'.$key.'year'));
421 421
 			} elseif ($search[$key] != '') {
422
-				$param .= '&search_' . $key . '=' . urlencode($search[$key]);
422
+				$param .= '&search_'.$key.'='.urlencode($search[$key]);
423 423
 			}
424 424
 		}
425 425
 		// Add $param from hooks
426
-		$parameters = array();  // @phan-suppress-current-line PhanPluginRedundantAssignment
426
+		$parameters = array(); // @phan-suppress-current-line PhanPluginRedundantAssignment
427 427
 		$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
428 428
 		$param .= $hookmanager->resPrint;
429 429
 
430 430
 		$url_file = $context->getControllerUrl($context->controller);
431
-		$html .= '<form method="POST" id="searchFormList" action="' . $url_file . '">' . "\n";
431
+		$html .= '<form method="POST" id="searchFormList" action="'.$url_file.'">'."\n";
432 432
 		$html .= $context->getFormToken();
433 433
 		$html .= '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
434 434
 		$html .= '<input type="hidden" name="action" value="list">';
435
-		$html .= '<input type="hidden" name="sortfield" value="' . $sortfield . '">';
436
-		$html .= '<input type="hidden" name="sortorder" value="' . $sortorder . '">';
437
-		$html .= '<input type="hidden" name="page" value="' . $page . '">';
438
-		$html .= '<input type="hidden" name="contextpage" value="' . $contextpage . '">';
435
+		$html .= '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
436
+		$html .= '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
437
+		$html .= '<input type="hidden" name="page" value="'.$page.'">';
438
+		$html .= '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
439 439
 
440 440
 		// pagination
441
-		$pagination_param = $param . '&sortfield=' . $sortfield . '&sortorder=' . $sortorder;
442
-		$html .= '<nav id="webportal-' . $elementEn . '-pagination">';
441
+		$pagination_param = $param.'&sortfield='.$sortfield.'&sortorder='.$sortorder;
442
+		$html .= '<nav id="webportal-'.$elementEn.'-pagination">';
443 443
 		$html .= '<ul>';
444
-		$html .= '<li><strong>' . $langs->trans($titleKey) . '</strong> (' . $nbtotalofrecords . ')</li>';
444
+		$html .= '<li><strong>'.$langs->trans($titleKey).'</strong> ('.$nbtotalofrecords.')</li>';
445 445
 		$html .= '</ul>';
446 446
 
447 447
 		/* Generate pagination list */
448
-		$html .= static::generatePageListNav($url_file . $pagination_param, $nbpages, $page);
448
+		$html .= static::generatePageListNav($url_file.$pagination_param, $nbpages, $page);
449 449
 
450 450
 		$html .= '</nav>';
451 451
 
452 452
 		// table with search filters and column titles
453
-		$html .= '<table id="webportal-' . $elementEn . '-list" responsive="scroll" role="grid">';
453
+		$html .= '<table id="webportal-'.$elementEn.'-list" responsive="scroll" role="grid">';
454 454
 		// title and desc for table
455 455
 		//if ($titleKey != '') {
456 456
 		//    $html .= '<caption id="table-collapse-responsive">';
@@ -474,22 +474,22 @@  discard block
 block discarded – undo
474 474
 		$html .= '</td>';
475 475
 		// }
476 476
 		foreach ($object->fields as $key => $val) {
477
-			if (!empty($arrayfields['t.' . $key]['checked'])) {
478
-				$html .= '<td data-label="' . $arrayfields['t.' . $key]['label'] . '" data-col="'.dol_escape_htmltag($key).'" >';
477
+			if (!empty($arrayfields['t.'.$key]['checked'])) {
478
+				$html .= '<td data-label="'.$arrayfields['t.'.$key]['label'].'" data-col="'.dol_escape_htmltag($key).'" >';
479 479
 				if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) {
480
-					$html .= $this->form->selectarray('search_' . $key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', '');
480
+					$html .= $this->form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', '');
481 481
 				} elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
482
-					$postDateStart = GETPOST('search_' . $key . '_dtstart', 'alphanohtml');
483
-					$postDateEnd = GETPOST('search_' . $key . '_dtend', 'alphanohtml');
482
+					$postDateStart = GETPOST('search_'.$key.'_dtstart', 'alphanohtml');
483
+					$postDateEnd = GETPOST('search_'.$key.'_dtend', 'alphanohtml');
484 484
 
485 485
 					$html .= '<div class="grid">';
486
-					$html .= $this->form->inputDate('search_' . $key . '_dtstart', $postDateStart ? $postDateStart : '', $langs->trans('From'));
486
+					$html .= $this->form->inputDate('search_'.$key.'_dtstart', $postDateStart ? $postDateStart : '', $langs->trans('From'));
487 487
 					$html .= '</div>';
488 488
 					$html .= '<div class="grid">';
489
-					$html .= $this->form->inputDate('search_' . $key . '_dtend', $postDateEnd ? $postDateEnd : '', $langs->trans('to'));
489
+					$html .= $this->form->inputDate('search_'.$key.'_dtend', $postDateEnd ? $postDateEnd : '', $langs->trans('to'));
490 490
 					$html .= '</div>';
491 491
 				} else {
492
-					$html .= '<input type="text" name="search_' . $key . '" value="' . dol_escape_htmltag(isset($search[$key]) ? $search[$key] : '') . '">';
492
+					$html .= '<input type="text" name="search_'.$key.'" value="'.dol_escape_htmltag(isset($search[$key]) ? $search[$key] : '').'">';
493 493
 				}
494 494
 				$html .= '</td>';
495 495
 			}
@@ -500,12 +500,12 @@  discard block
 block discarded – undo
500 500
 		$html .= $hookmanager->resPrint;
501 501
 		// Remain to pay
502 502
 		if (!empty($arrayfields['remain_to_pay']['checked'])) {
503
-			$html .= '<td data-label="' . $arrayfields['remain_to_pay']['label'] . '">';
503
+			$html .= '<td data-label="'.$arrayfields['remain_to_pay']['label'].'">';
504 504
 			$html .= '</td>';
505 505
 		}
506 506
 		// Download link
507 507
 		if (!empty($arrayfields['download_link']['checked'])) {
508
-			$html .= '<td data-label="' . $arrayfields['download_link']['label'] . '">';
508
+			$html .= '<td data-label="'.$arrayfields['download_link']['label'].'">';
509 509
 			$html .= '</td>';
510 510
 		}
511 511
 		$html .= '</tr>';
@@ -523,16 +523,16 @@  discard block
 block discarded – undo
523 523
 		$totalarray['nbfield']++;
524 524
 		// }
525 525
 		foreach ($object->fields as $key => $val) {
526
-			$tableKey = 't.' . $key;
526
+			$tableKey = 't.'.$key;
527 527
 			if (!empty($arrayfields[$tableKey]['checked'])) {
528 528
 				$tableOrder = '';
529 529
 				if (array_key_exists($tableKey, $sortList)) {
530 530
 					$tableOrder = strtolower($sortList[$tableKey]);
531 531
 				}
532
-				$url_param = $url_file . '&sortfield=' . $tableKey . '&sortorder=' . ($tableOrder == 'desc' ? 'asc' : 'desc') . $param;
533
-				$html .= '<th data-col="'.dol_escape_htmltag($key).'"  scope="col"' . ($tableOrder != '' ? ' table-order="' . $tableOrder . '"' : '') . '>';
534
-				$html .= '<a href="' . $url_param . '">';
535
-				$html .= $langs->trans($arrayfields['t.' . $key]['label']);
532
+				$url_param = $url_file.'&sortfield='.$tableKey.'&sortorder='.($tableOrder == 'desc' ? 'asc' : 'desc').$param;
533
+				$html .= '<th data-col="'.dol_escape_htmltag($key).'"  scope="col"'.($tableOrder != '' ? ' table-order="'.$tableOrder.'"' : '').'>';
534
+				$html .= '<a href="'.$url_param.'">';
535
+				$html .= $langs->trans($arrayfields['t.'.$key]['label']);
536 536
 				$html .= '</a>';
537 537
 				$html .= '</th>';
538 538
 				$totalarray['nbfield']++;
@@ -601,13 +601,13 @@  discard block
 block discarded – undo
601 601
 					$remaintopay = 0;
602 602
 				}
603 603
 				if ($object->type == Facture::TYPE_CREDIT_NOTE && $obj->paye == 1 && $discount) {
604
-					$remaincreditnote = $discount->getAvailableDiscounts($companyStatic, '', 'rc.fk_facture_source=' . $object->id);
604
+					$remaincreditnote = $discount->getAvailableDiscounts($companyStatic, '', 'rc.fk_facture_source='.$object->id);
605 605
 					$remaintopay = -$remaincreditnote;
606 606
 				}
607 607
 			}
608 608
 
609 609
 			// Show line of result
610
-			$html .= '<tr data-rowid="' . $object->id . '">';
610
+			$html .= '<tr data-rowid="'.$object->id.'">';
611 611
 			// if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
612 612
 			$html .= '<td class="nowraponall">';
613 613
 			$html .= '</td>';
@@ -616,8 +616,8 @@  discard block
 block discarded – undo
616 616
 			}
617 617
 			// }
618 618
 			foreach ($object->fields as $key => $val) {
619
-				if (!empty($arrayfields['t.' . $key]['checked'])) {
620
-					$html .= '<td class="nowraponall" data-label="' . $arrayfields['t.' . $key]['label'] . '">';
619
+				if (!empty($arrayfields['t.'.$key]['checked'])) {
620
+					$html .= '<td class="nowraponall" data-label="'.$arrayfields['t.'.$key]['label'].'">';
621 621
 					if ($key == 'status' || $key == 'fk_statut') {
622 622
 						if ($elementEn == 'invoice') {
623 623
 							// specific to get invoice status (depends on payment)
@@ -638,21 +638,21 @@  discard block
 block discarded – undo
638 638
 					}
639 639
 					if (!empty($val['isameasure']) && $val['isameasure'] == 1) {
640 640
 						if (!$i) {
641
-							$totalarray['pos'][$totalarray['nbfield']] = 't.' . $key;
641
+							$totalarray['pos'][$totalarray['nbfield']] = 't.'.$key;
642 642
 						}
643 643
 						if (!isset($totalarray['val'])) {
644 644
 							$totalarray['val'] = array();
645 645
 						}
646
-						if (!isset($totalarray['val']['t.' . $key])) {
647
-							$totalarray['val']['t.' . $key] = 0;
646
+						if (!isset($totalarray['val']['t.'.$key])) {
647
+							$totalarray['val']['t.'.$key] = 0;
648 648
 						}
649
-						$totalarray['val']['t.' . $key] += $object->$key;
649
+						$totalarray['val']['t.'.$key] += $object->$key;
650 650
 					}
651 651
 				}
652 652
 			}
653 653
 			// Remain to pay
654 654
 			if (!empty($arrayfields['remain_to_pay']['checked'])) {
655
-				$html .= '<td class="nowraponall" data-label="' . $arrayfields['remain_to_pay']['label'] . '">';
655
+				$html .= '<td class="nowraponall" data-label="'.$arrayfields['remain_to_pay']['label'].'">';
656 656
 				$html .= $this->form->showOutputFieldForObject($object, $arrayfields['remain_to_pay'], 'remain_to_pay', $remaintopay, '');
657 657
 				//$html .= price($remaintopay);
658 658
 				$html .= '</td>';
@@ -663,9 +663,9 @@  discard block
 block discarded – undo
663 663
 			// Download link
664 664
 			if (!empty($arrayfields['download_link']['checked'])) {
665 665
 				$element = $object->element;
666
-				$html .= '<td class="nowraponall" data-label="' . $arrayfields['download_link']['label'] . '">';
666
+				$html .= '<td class="nowraponall" data-label="'.$arrayfields['download_link']['label'].'">';
667 667
 				$filename = dol_sanitizeFileName($obj->ref);
668
-				$filedir = $conf->{$element}->multidir_output[$obj->element_entity] . '/' . dol_sanitizeFileName($obj->ref);
668
+				$filedir = $conf->{$element}->multidir_output[$obj->element_entity].'/'.dol_sanitizeFileName($obj->ref);
669 669
 				$html .= $this->form->getDocumentsLink($element, $filename, $filedir);
670 670
 				$html .= '</td>';
671 671
 				if (!$i) {
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
 					$html .= '</td>';
703 703
 				} else {
704 704
 					if ($i == 1) {
705
-						$html .= '<td>' . $langs->trans("Total") . '</td>';
705
+						$html .= '<td>'.$langs->trans("Total").'</td>';
706 706
 					} else {
707 707
 						$html .= '<td></td>';
708 708
 					}
@@ -719,7 +719,7 @@  discard block
 block discarded – undo
719 719
 					$colspan++;
720 720
 				}
721 721
 			}
722
-			$html .= '<tr><td colspan="' . $colspan . '"><span class="opacitymedium">' . $langs->trans("NoRecordFound") . '</span></td></tr>';
722
+			$html .= '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
723 723
 		}
724 724
 
725 725
 		$html .= '</tbody>';
@@ -754,7 +754,7 @@  discard block
 block discarded – undo
754 754
 		$html = '<ul class="pages-nav-list">';
755 755
 
756 756
 		if ($currentPage > 1) {
757
-			$html .= '<li><a class="pages-nav-list__icon --prev" aria-label="' . dol_escape_htmltag($langs->trans('AriaPrevPage')) . '" href="' . $url . $pSep . 'page=' . ($currentPage - 1) . '" ' . ($currentPage <= 1 ? ' disabled' : '') . '></a></li>';
757
+			$html .= '<li><a class="pages-nav-list__icon --prev" aria-label="'.dol_escape_htmltag($langs->trans('AriaPrevPage')).'" href="'.$url.$pSep.'page='.($currentPage - 1).'" '.($currentPage <= 1 ? ' disabled' : '').'></a></li>';
758 758
 		}
759 759
 
760 760
 		$maxPaginItem = min($nbPages, 5);
@@ -762,21 +762,21 @@  discard block
 block discarded – undo
762 762
 		$maxPageNum = min($nbPages, $currentPage + 3);
763 763
 
764 764
 		if ($minPageNum > 1) {
765
-			$html .= '<li><a class="pages-nav-list__link ' . ($currentPage == 1 ? '--active' : '') . '" aria-label="' . dol_escape_htmltag($langs->trans('AriaPageX', 1)) . '" href="' . $url . $pSep . 'page=1" >1</a></li>';
765
+			$html .= '<li><a class="pages-nav-list__link '.($currentPage == 1 ? '--active' : '').'" aria-label="'.dol_escape_htmltag($langs->trans('AriaPageX', 1)).'" href="'.$url.$pSep.'page=1" >1</a></li>';
766 766
 			$html .= '<li>&hellip;</li>';
767 767
 		}
768 768
 
769 769
 		for ($p = $minPageNum; $p <= $maxPageNum; $p++) {
770
-			$html .= '<li><a class="pages-nav-list__link ' . ($currentPage === $p ? '--active' : '') . '" aria-label="' . dol_escape_htmltag($langs->trans('AriaPageX', $p)) . '"  href="' . $url . $pSep . 'page=' . $p . '">' . $p . '</a></li>';
770
+			$html .= '<li><a class="pages-nav-list__link '.($currentPage === $p ? '--active' : '').'" aria-label="'.dol_escape_htmltag($langs->trans('AriaPageX', $p)).'"  href="'.$url.$pSep.'page='.$p.'">'.$p.'</a></li>';
771 771
 		}
772 772
 
773 773
 		if ($maxPaginItem < $nbPages) {
774 774
 			$html .= '<li>&hellip;</li>';
775
-			$html .= '<li><a class="pages-nav-list__link ' . ($currentPage == $nbPages ? '--active' : '') . '" aria-label="' . dol_escape_htmltag($langs->trans('AriaPageX', $nbPages)) . '" href="' . $url . $pSep . 'page=' . $nbPages . '">' . $nbPages . '</a></li>';
775
+			$html .= '<li><a class="pages-nav-list__link '.($currentPage == $nbPages ? '--active' : '').'" aria-label="'.dol_escape_htmltag($langs->trans('AriaPageX', $nbPages)).'" href="'.$url.$pSep.'page='.$nbPages.'">'.$nbPages.'</a></li>';
776 776
 		}
777 777
 
778 778
 		if ($currentPage < $nbPages) {
779
-			$html .= '<li><a class="pages-nav-list__icon --next" aria-label="' . dol_escape_htmltag($langs->trans('AriaNextPage')) . '" href="' . $url . $pSep . 'page=' . ($currentPage + 1) . '" ' . ($currentPage >= $nbPages ? ' disabled' : '') . '></a></li>';
779
+			$html .= '<li><a class="pages-nav-list__icon --next" aria-label="'.dol_escape_htmltag($langs->trans('AriaNextPage')).'" href="'.$url.$pSep.'page='.($currentPage + 1).'" '.($currentPage >= $nbPages ? ' disabled' : '').'></a></li>';
780 780
 		}
781 781
 
782 782
 		$html .= '</ul>';
Please login to merge, or discard this patch.
htdocs/webportal/class/html.formcardwebportal.class.php 1 patch
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  * \brief      File of class with all html predefined components for WebPortal
26 26
  */
27 27
 
28
-require_once DOL_DOCUMENT_ROOT . '/webportal/class/html.formwebportal.class.php';
28
+require_once DOL_DOCUMENT_ROOT.'/webportal/class/html.formwebportal.class.php';
29 29
 
30 30
 /**
31 31
  *    Class to manage generation of HTML components
@@ -152,15 +152,15 @@  discard block
 block discarded – undo
152 152
 		global $hookmanager, $langs;
153 153
 
154 154
 		$elementEnUpper = strtoupper($elementEn);
155
-		$objectclass = 'WebPortal' . ucfirst($elementEn);
155
+		$objectclass = 'WebPortal'.ucfirst($elementEn);
156 156
 
157
-		$elementCardAccess = getDolGlobalString('WEBPORTAL_' . $elementEnUpper . '_CARD_ACCESS', 'hidden');
157
+		$elementCardAccess = getDolGlobalString('WEBPORTAL_'.$elementEnUpper.'_CARD_ACCESS', 'hidden');
158 158
 		if ($elementCardAccess == 'hidden' || $id <= 0) {
159 159
 			accessforbidden();
160 160
 		}
161 161
 
162 162
 		// load module libraries
163
-		dol_include_once('/webportal/class/webportal' . $elementEn . '.class.php');
163
+		dol_include_once('/webportal/class/webportal'.$elementEn.'.class.php');
164 164
 
165 165
 		// Load translation files required by the page
166 166
 		$langs->loadLangs(array('website', 'other'));
@@ -171,15 +171,15 @@  discard block
 block discarded – undo
171 171
 		$action = GETPOST('action', 'aZ09');
172 172
 		$confirm = GETPOST('confirm', 'alpha');
173 173
 		$cancel = GETPOST('cancel', 'aZ09');
174
-		$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'webportal' . $elementEn . 'card'; // To manage different context of search
175
-		$backtopage = GETPOST('backtopage', 'alpha');                    // if not set, a default page will be used
176
-		$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');    // if not set, $backtopage will be used
174
+		$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'webportal'.$elementEn.'card'; // To manage different context of search
175
+		$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
176
+		$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
177 177
 		$backtopagejsfields = GETPOST('backtopagejsfields', 'alpha');
178 178
 
179 179
 		// Initialize technical objects
180 180
 		$object = new $objectclass($this->db);
181 181
 		//$extrafields = new ExtraFields($db);
182
-		$hookmanager->initHooks(array('webportal' . $elementEn . 'card', 'globalcard')); // Note that conf->hooks_modules contains array
182
+		$hookmanager->initHooks(array('webportal'.$elementEn.'card', 'globalcard')); // Note that conf->hooks_modules contains array
183 183
 
184 184
 		// Fetch optionals attributes and labels
185 185
 		//$extrafields->fetch_name_optionals_label($object->table_element);
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 		}
191 191
 
192 192
 		// Load object
193
-		include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
193
+		include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
194 194
 
195 195
 		// Security check (enable the most restrictive one)
196 196
 		if (!isModEnabled('webportal')) {
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 		$this->permissiontodelete = $permissiontodelete;
215 215
 		$this->permissionnote = $permissionnote;
216 216
 		$this->permissiondellink = $permissiondellink;
217
-		$this->titleKey = $objectclass . 'CardTitle';
217
+		$this->titleKey = $objectclass.'CardTitle';
218 218
 		$this->ref = $ref;
219 219
 	}
220 220
 
@@ -247,17 +247,17 @@  discard block
 block discarded – undo
247 247
 
248 248
 		if (empty($backtopage) || ($cancel && empty($id))) {
249 249
 			if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
250
-				$backtopage = $context->getControllerUrl($elementEn . 'card');
250
+				$backtopage = $context->getControllerUrl($elementEn.'card');
251 251
 			}
252 252
 		}
253 253
 
254 254
 		// Action to cancel record
255 255
 		if ($cancel) {
256 256
 			if (!empty($backtopageforcancel)) {
257
-				header("Location: " . $backtopageforcancel);
257
+				header("Location: ".$backtopageforcancel);
258 258
 				exit;
259 259
 			} elseif (!empty($backtopage)) {
260
-				header("Location: " . $backtopage);
260
+				header("Location: ".$backtopage);
261 261
 				exit;
262 262
 			}
263 263
 			$action = '';
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 			foreach ($object->fields as $key => $val) {
269 269
 				// Check if field was submitted to be edited
270 270
 				if ($object->fields[$key]['type'] == 'duration') {
271
-					if (!GETPOSTISSET($key . 'hour') || !GETPOSTISSET($key . 'min')) {
271
+					if (!GETPOSTISSET($key.'hour') || !GETPOSTISSET($key.'min')) {
272 272
 						continue; // The field was not submitted to be saved
273 273
 					}
274 274
 				} elseif ($object->fields[$key]['type'] == 'boolean') {
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 						$dateDay = (int) $dateArr[2];
320 320
 					}
321 321
 					// extract time HH:ii:ss for hours, minutes and seconds
322
-					$postTime = GETPOST($key . '_time', 'alphanohtml');
322
+					$postTime = GETPOST($key.'_time', 'alphanohtml');
323 323
 					$timeArr = explode(':', $postTime);
324 324
 					$timeHours = 12;
325 325
 					$timeMinutes = 0;
@@ -337,8 +337,8 @@  discard block
 block discarded – undo
337 337
 					}
338 338
 					$value = dol_mktime($timeHours, $timeMinutes, $timeSeconds, $dateMonth, $dateDay, $dateYear);
339 339
 				} elseif ($object->fields[$key]['type'] == 'duration') {
340
-					if (GETPOSTINT($key . 'hour') != '' || GETPOSTINT($key . 'min') != '') {
341
-						$value = 60 * 60 * GETPOSTINT($key . 'hour') + 60 * GETPOSTINT($key . 'min');
340
+					if (GETPOSTINT($key.'hour') != '' || GETPOSTINT($key.'min') != '') {
341
+						$value = 60 * 60 * GETPOSTINT($key.'hour') + 60 * GETPOSTINT($key.'min');
342 342
 					} else {
343 343
 						$value = '';
344 344
 					}
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
 					$urltogo = $backtopage ? str_replace('__ID__', $result, $backtopage) : $backurlforlist;
408 408
 					$urltogo = preg_replace('/--IDFORBACKTOPAGE--/', (string) $object->id, $urltogo); // New method to autoselect project after a New on another form object creation
409 409
 					if ($urltogo && empty($noback)) {
410
-						header("Location: " . $urltogo);
410
+						header("Location: ".$urltogo);
411 411
 						exit;
412 412
 					}
413 413
 				} else {
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
 		// main information - begin
467 467
 		$html .= '<div class="header-card-main-information">';
468 468
 		// ref
469
-		$html .= '<div><strong>' . $object->ref . '</strong></div>';
469
+		$html .= '<div><strong>'.$object->ref.'</strong></div>';
470 470
 		// full name
471 471
 		$fullname = '';
472 472
 		if (method_exists($object, 'getFullName')) {
@@ -476,11 +476,11 @@  discard block
 block discarded – undo
476 476
 		if ($object->element == 'member') {
477 477
 			if ($object->morphy == 'mor' && !empty($object->societe)) {
478 478
 				$html .= dol_htmlentities($object->societe);
479
-				$html .= (!empty($fullname) && $object->societe != $fullname) ? ' (' . dol_htmlentities($fullname) . $addgendertxt . ')' : '';
479
+				$html .= (!empty($fullname) && $object->societe != $fullname) ? ' ('.dol_htmlentities($fullname).$addgendertxt.')' : '';
480 480
 			} else {
481
-				$html .= dol_htmlentities($fullname) . $addgendertxt;
481
+				$html .= dol_htmlentities($fullname).$addgendertxt;
482 482
 				if (empty($object->fk_soc)) {
483
-					$html .= (!empty($object->societe) && $object->societe != $fullname) ? ' (' . dol_htmlentities($object->societe) . ')' : '';
483
+					$html .= (!empty($object->societe) && $object->societe != $fullname) ? ' ('.dol_htmlentities($object->societe).')' : '';
484 484
 				}
485 485
 			}
486 486
 		} else {
@@ -570,23 +570,23 @@  discard block
 block discarded – undo
570 570
 
571 571
 			$value = $object->$key;
572 572
 
573
-			$html .= '<div class="grid field_' . $key . '">';
573
+			$html .= '<div class="grid field_'.$key.'">';
574 574
 
575
-			$html .= '<div class="' . (empty($val['tdcss']) ? '' : $val['tdcss']) . ' fieldname_' . $key;
575
+			$html .= '<div class="'.(empty($val['tdcss']) ? '' : $val['tdcss']).' fieldname_'.$key;
576 576
 			$html .= '">';
577 577
 			$labeltoshow = '';
578
-			$labeltoshow .= '<strong>' . $langs->trans($val['label']) . '</strong>';
578
+			$labeltoshow .= '<strong>'.$langs->trans($val['label']).'</strong>';
579 579
 			$html .= $labeltoshow;
580 580
 			$html .= '</div>';
581 581
 
582
-			$html .= '<div class="valuefield fieldname_' . $key;
582
+			$html .= '<div class="valuefield fieldname_'.$key;
583 583
 			if (!empty($val['cssview'])) {
584
-				$html .= ' ' . $val['cssview'];
584
+				$html .= ' '.$val['cssview'];
585 585
 			}
586 586
 			$html .= '">';
587 587
 			if ($key == 'lang') {
588 588
 				$langs->load('languages');
589
-				$labellang = ($value ? $langs->trans('Language_' . $value) : '');
589
+				$labellang = ($value ? $langs->trans('Language_'.$value) : '');
590 590
 				//$html .= picto_from_langcode($value, 'class="paddingrightonly saturatemedium opacitylow"');
591 591
 				$html .= $labellang;
592 592
 			} else {
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
 				continue; // We don't want this field
647 647
 			}
648 648
 
649
-			$html .= '<div class="grid field_' . $key . '">';
649
+			$html .= '<div class="grid field_'.$key.'">';
650 650
 			$html .= '<div class="titlefieldcreate';
651 651
 			if (isset($val['notnull']) && $val['notnull'] > 0) {
652 652
 				$html .= ' required';
@@ -678,15 +678,15 @@  discard block
 block discarded – undo
678 678
 				$value = GETPOSTISSET($key) ? GETPOST($key, $check) : $object->$key;
679 679
 			} elseif (in_array($val['type'], array('date', 'datetime'))) {
680 680
 				$isPostDate = GETPOSTISSET($key);
681
-				$isPostTime = GETPOSTISSET($key . '_time');
681
+				$isPostTime = GETPOSTISSET($key.'_time');
682 682
 				if ($isPostDate) {
683 683
 					$postDate = GETPOST($key, 'alphanohtml');
684 684
 					if ($isPostTime) {
685
-						$postTime = GETPOST($key . '_time', 'alphanohtml') . ':00';
685
+						$postTime = GETPOST($key.'_time', 'alphanohtml').':00';
686 686
 					} else {
687 687
 						$postTime = '00:00:00';
688 688
 					}
689
-					$valueDateTimeStr = $postDate . ' ' . $postTime;
689
+					$valueDateTimeStr = $postDate.' '.$postTime;
690 690
 				} else {
691 691
 					// format date timestamp to YYYY-MM-DD HH:ii:ss
692 692
 					$valueDateTimeStr = dol_print_date($object->$key, '%Y-%m-%d %H:%M:%S');
@@ -758,19 +758,19 @@  discard block
 block discarded – undo
758 758
 			$html .= '<article>';
759 759
 			//$html .= load_fiche_titre($title, '', 'object_'.$object->picto);
760 760
 			$html .= '<header>';
761
-			$html .= '<h2>' . $title . '</h2>';
761
+			$html .= '<h2>'.$title.'</h2>';
762 762
 			$html .= '</header>';
763 763
 
764 764
 			$url_file = $context->getControllerUrl($context->controller, '', false);
765
-			$html .= '<form method="POST" action="' . $url_file . '">';
765
+			$html .= '<form method="POST" action="'.$url_file.'">';
766 766
 			$html .= $context->getFormToken();
767 767
 			$html .= '<input type="hidden" name="action" value="update">';
768
-			$html .= '<input type="hidden" name="id" value="' . $object->id . '">';
768
+			$html .= '<input type="hidden" name="id" value="'.$object->id.'">';
769 769
 			if ($backtopage) {
770
-				$html .= '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
770
+				$html .= '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
771 771
 			}
772 772
 			if ($backtopageforcancel) {
773
-				$html .= '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">';
773
+				$html .= '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
774 774
 			}
775 775
 
776 776
 			//$html .= '<table>'."\n";
@@ -784,8 +784,8 @@  discard block
 block discarded – undo
784 784
 
785 785
 			// Save and Cancel buttons
786 786
 			$html .= '<div class="grid">';
787
-			$html .= '<div><input type="submit" name="save" role="button" value="' . dol_escape_htmltag($langs->trans('Save')) . '" /></div>';
788
-			$html .= '<div><input type="submit" name="cancel" role="button" value="' . dol_escape_htmltag($langs->trans('Cancel')) . '" /></div>';
787
+			$html .= '<div><input type="submit" name="save" role="button" value="'.dol_escape_htmltag($langs->trans('Save')).'" /></div>';
788
+			$html .= '<div><input type="submit" name="cancel" role="button" value="'.dol_escape_htmltag($langs->trans('Cancel')).'" /></div>';
789 789
 			$html .= '</div>';
790 790
 
791 791
 			$html .= '</form>';
@@ -826,7 +826,7 @@  discard block
 block discarded – undo
826 826
 
827 827
 			// Buttons for actions
828 828
 			if ($action != 'presend' && $action != 'editline') {
829
-				$html .= '<div>' . "\n";
829
+				$html .= '<div>'."\n";
830 830
 				$parameters = array();
831 831
 				$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
832 832
 				if ($reshook < 0) {
@@ -836,10 +836,10 @@  discard block
 block discarded – undo
836 836
 				if (empty($reshook)) {
837 837
 					if ($permissiontoadd) {
838 838
 						$url_file = $context->getControllerUrl($context->controller, '', false);
839
-						$html .= '<a href="' . $url_file . '&id=' . $object->id . '&action=edit" role="button">' . $langs->trans('Modify') . '</a>';
839
+						$html .= '<a href="'.$url_file.'&id='.$object->id.'&action=edit" role="button">'.$langs->trans('Modify').'</a>';
840 840
 					}
841 841
 				}
842
-				$html .= '</div>' . "\n";
842
+				$html .= '</div>'."\n";
843 843
 			}
844 844
 		}
845 845
 
Please login to merge, or discard this patch.
htdocs/accountancy/bookkeeping/card.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
 		if ($mode != "_tmp") {
565 565
 			// Date document export
566 566
 			print '<tr>';
567
-			print '<td class="titlefield">' . $langs->trans("DateExport") . '</td>';
567
+			print '<td class="titlefield">'.$langs->trans("DateExport").'</td>';
568 568
 			print '<td>';
569 569
 			print $object->date_export ? dol_print_date($object->date_export, 'dayhour') : '&nbsp;';
570 570
 			print '</td>';
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
 
573 573
 			// Date document validation
574 574
 			print '<tr>';
575
-			print '<td class="titlefield">' . $langs->trans("DateValidation") . '</td>';
575
+			print '<td class="titlefield">'.$langs->trans("DateValidation").'</td>';
576 576
 			print '<td>';
577 577
 			print $object->date_validation ? dol_print_date($object->date_validation, 'dayhour') : '&nbsp;';
578 578
 			print '</td>';
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
 			// Id_import
582 582
 			if (!empty($object->import_key)) {
583 583
 				print '<tr>';
584
-				print '<td class="titlefield">' . $langs->trans("ImportId") . '</td>';
584
+				print '<td class="titlefield">'.$langs->trans("ImportId").'</td>';
585 585
 				print '<td>';
586 586
 				print $object->import_key;
587 587
 				print '</td>';
@@ -639,7 +639,7 @@  discard block
 block discarded – undo
639 639
 
640 640
 		print '<br>';
641 641
 
642
-		$result = $object->fetchAllPerMvt($piece_num, $mode);	// This load $object->linesmvt
642
+		$result = $object->fetchAllPerMvt($piece_num, $mode); // This load $object->linesmvt
643 643
 
644 644
 		if ($result < 0) {
645 645
 			setEventMessages($object->error, $object->errors, 'errors');
@@ -735,14 +735,14 @@  discard block
 block discarded – undo
735 735
 							if (getDolGlobalString('ACCOUNTANCY_COMBO_FOR_AUX')) {
736 736
 								print $formaccounting->select_auxaccount('', 'subledger_account', 1, 'maxwidth250', '', 'subledger_label');
737 737
 							} else {
738
-								print '<input type="text" class="maxwidth150" name="subledger_account" value="" placeholder="' . dol_escape_htmltag($langs->trans("SubledgerAccount")) . '">';
738
+								print '<input type="text" class="maxwidth150" name="subledger_account" value="" placeholder="'.dol_escape_htmltag($langs->trans("SubledgerAccount")).'">';
739 739
 							}
740
-							print '<br><input type="text" class="maxwidth150" name="subledger_label" value="" placeholder="' . dol_escape_htmltag($langs->trans("SubledgerAccountLabel")) . '">';
740
+							print '<br><input type="text" class="maxwidth150" name="subledger_label" value="" placeholder="'.dol_escape_htmltag($langs->trans("SubledgerAccountLabel")).'">';
741 741
 							print '</td>';
742
-							print '<td><input type="text" class="minwidth200" name="label_operation" value="' . $label_operation . '"/></td>';
742
+							print '<td><input type="text" class="minwidth200" name="label_operation" value="'.$label_operation.'"/></td>';
743 743
 							print '<td class="right"><input type="text" size="6" class="right" name="debit" value=""/></td>';
744 744
 							print '<td class="right"><input type="text" size="6" class="right" name="credit" value=""/></td>';
745
-							print '<td class="center"><input type="submit" class="button small" name="save" value="' . $langs->trans("Add") . '"></td>';
745
+							print '<td class="center"><input type="submit" class="button small" name="save" value="'.$langs->trans("Add").'"></td>';
746 746
 						}
747 747
 					} else {
748 748
 						print '<!-- td columns in display mode -->';
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
 
766 766
 						print '<td class="center nowraponall">';
767 767
 						if (empty($line->date_export) && empty($line->date_validation)) {
768
-							print '<a class="editfielda reposition" href="' . $_SERVER["PHP_SELF"] . '?action=update&id=' . $line->id . '&piece_num=' . urlencode($line->piece_num) . '&mode=' . urlencode($mode) . '&token=' . urlencode(newToken()) . '">';
768
+							print '<a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?action=update&id='.$line->id.'&piece_num='.urlencode($line->piece_num).'&mode='.urlencode($mode).'&token='.urlencode(newToken()).'">';
769 769
 							print img_edit('', 0, 'class="marginrightonly"');
770 770
 							print '</a> &nbsp;';
771 771
 						} else {
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
 								$actiontodelete = 'confirm_delete';
781 781
 							}
782 782
 
783
-							print '<a href="' . $_SERVER["PHP_SELF"] . '?action=' . $actiontodelete . '&id=' . $line->id . '&piece_num=' . urlencode($line->piece_num) . '&mode=' . urlencode($mode) . '&token=' . urlencode(newToken()) . '">';
783
+							print '<a href="'.$_SERVER["PHP_SELF"].'?action='.$actiontodelete.'&id='.$line->id.'&piece_num='.urlencode($line->piece_num).'&mode='.urlencode($mode).'&token='.urlencode(newToken()).'">';
784 784
 							print img_delete();
785 785
 							print '</a>';
786 786
 						} else {
Please login to merge, or discard this patch.