@@ -582,7 +582,7 @@ discard block |
||
582 | 582 | } |
583 | 583 | |
584 | 584 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
585 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
585 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
586 | 586 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
587 | 587 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
588 | 588 | |
@@ -873,7 +873,7 @@ discard block |
||
873 | 873 | $starthalfday = ($obj->halfday == -1 || $obj->halfday == 2) ? 'afternoon' : 'morning'; |
874 | 874 | $endhalfday = ($obj->halfday == 1 || $obj->halfday == 2) ? 'morning' : 'afternoon'; |
875 | 875 | |
876 | - $nbopenedday = num_open_day($db->jdate($obj->date_debut, 1), $db->jdate($obj->date_fin, 1), 0, 1, $obj->halfday); // user jdate(..., 1) because num_open_day need UTC dates |
|
876 | + $nbopenedday = num_open_day($db->jdate($obj->date_debut, 1), $db->jdate($obj->date_fin, 1), 0, 1, $obj->halfday); // user jdate(..., 1) because num_open_day need UTC dates |
|
877 | 877 | $totalduration += $nbopenedday; |
878 | 878 | |
879 | 879 | if ($mode == 'kanban') { |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... |
42 | 42 | $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) |
43 | -$mode = GETPOST('mode', 'alpha'); |
|
43 | +$mode = GETPOST('mode', 'alpha'); |
|
44 | 44 | $show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? |
45 | 45 | $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation |
46 | 46 | $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | $include = ''; |
312 | 312 | |
313 | 313 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
314 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
314 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
315 | 315 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
316 | 316 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
317 | 317 |
@@ -457,7 +457,7 @@ |
||
457 | 457 | print '<br>'; |
458 | 458 | |
459 | 459 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
460 | - $htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
460 | + $htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
461 | 461 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
462 | 462 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
463 | 463 |
@@ -333,7 +333,7 @@ |
||
333 | 333 | print '<div class="info">'.$langs->trans("WarningCreateSubAccounts").'</div>'; |
334 | 334 | |
335 | 335 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
336 | - $htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
336 | + $htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
337 | 337 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
338 | 338 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
339 | 339 |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
56 | 56 | $mode = GETPOST('mode', 'alpha'); // for mode view result |
57 | 57 | |
58 | -$id = GETPOSTINT('id'); |
|
58 | +$id = GETPOSTINT('id'); |
|
59 | 59 | |
60 | 60 | // Load variable for pagination |
61 | 61 | $limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | // Default sort order (if not yet defined by previous GETPOST) |
86 | 86 | if (!$sortfield) { |
87 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
87 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
88 | 88 | $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. |
89 | 89 | } |
90 | 90 | if (!$sortorder) { |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | } |
278 | 278 | } else { |
279 | 279 | if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') { |
280 | - $columnName=preg_replace('/(_dtstart|_dtend)$/', '', $key); |
|
280 | + $columnName = preg_replace('/(_dtstart|_dtend)$/', '', $key); |
|
281 | 281 | if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) { |
282 | 282 | if (preg_match('/_dtstart$/', $key)) { |
283 | 283 | $sql .= " AND t.".$db->escape($columnName)." >= '".$db->idate($search[$key])."'"; |
@@ -483,7 +483,7 @@ discard block |
||
483 | 483 | } |
484 | 484 | |
485 | 485 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
486 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
486 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
487 | 487 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
488 | 488 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
489 | 489 | |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
575 | 575 | $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
576 | 576 | } |
577 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
577 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
578 | 578 | if (!empty($arrayfields['t.'.$key]['checked'])) { |
579 | 579 | print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist']))."\n"; |
580 | 580 | $totalarray['nbfield']++; |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | // Default sort order (if not yet defined by previous GETPOST) |
86 | 86 | if (!$sortfield) { |
87 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
87 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
88 | 88 | $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. |
89 | 89 | } |
90 | 90 | if (!$sortorder) { |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | } |
272 | 272 | } else { |
273 | 273 | if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') { |
274 | - $columnName=preg_replace('/(_dtstart|_dtend)$/', '', $key); |
|
274 | + $columnName = preg_replace('/(_dtstart|_dtend)$/', '', $key); |
|
275 | 275 | if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) { |
276 | 276 | if (preg_match('/_dtstart$/', $key)) { |
277 | 277 | $sql .= " AND t.".$db->escape($columnName)." >= '".$db->idate($search[$key])."'"; |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | } |
289 | 289 | |
290 | 290 | if (empty($permissiontoreadall)) { |
291 | - $sql.= " AND t.fk_user IN(".$db->sanitize(implode(", ", $user->getAllChildIds(1))).") "; |
|
291 | + $sql .= " AND t.fk_user IN(".$db->sanitize(implode(", ", $user->getAllChildIds(1))).") "; |
|
292 | 292 | } |
293 | 293 | |
294 | 294 | //$sql.= dolSqlDateFilter("t.field", $search_xxxday, $search_xxxmonth, $search_xxxyear); |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | } |
496 | 496 | |
497 | 497 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
498 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
498 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
499 | 499 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
500 | 500 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
501 | 501 | |
@@ -585,7 +585,7 @@ discard block |
||
585 | 585 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
586 | 586 | $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
587 | 587 | } |
588 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
588 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
589 | 589 | if (!empty($arrayfields['t.'.$key]['checked'])) { |
590 | 590 | print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist']))."\n"; |
591 | 591 | $totalarray['nbfield']++; |
@@ -56,11 +56,11 @@ discard block |
||
56 | 56 | |
57 | 57 | |
58 | 58 | // Get parameters |
59 | -$action = GETPOST('action', 'aZ09'); |
|
59 | +$action = GETPOST('action', 'aZ09'); |
|
60 | 60 | $massaction = GETPOST('massaction', 'alpha'); |
61 | 61 | $show_files = GETPOSTINT('show_files'); |
62 | -$confirm = GETPOST('confirm', 'alpha'); |
|
63 | -$toselect = GETPOST('toselect', 'array'); |
|
62 | +$confirm = GETPOST('confirm', 'alpha'); |
|
63 | +$toselect = GETPOST('toselect', 'array'); |
|
64 | 64 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'thirdpartylist'; |
65 | 65 | $optioncss = GETPOST('optioncss', 'alpha'); |
66 | 66 | if ($contextpage == 'poslist') { |
@@ -132,20 +132,20 @@ discard block |
||
132 | 132 | $search_date_creation_startmonth = GETPOSTINT('search_date_creation_startmonth'); |
133 | 133 | $search_date_creation_startyear = GETPOSTINT('search_date_creation_startyear'); |
134 | 134 | $search_date_creation_startday = GETPOSTINT('search_date_creation_startday'); |
135 | -$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver |
|
135 | +$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver |
|
136 | 136 | $search_date_creation_endmonth = GETPOSTINT('search_date_creation_endmonth'); |
137 | 137 | $search_date_creation_endyear = GETPOSTINT('search_date_creation_endyear'); |
138 | 138 | $search_date_creation_endday = GETPOSTINT('search_date_creation_endday'); |
139 | -$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver |
|
139 | +$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver |
|
140 | 140 | |
141 | 141 | $search_date_modif_startmonth = GETPOSTINT('search_date_modif_startmonth'); |
142 | 142 | $search_date_modif_startyear = GETPOSTINT('search_date_modif_startyear'); |
143 | 143 | $search_date_modif_startday = GETPOSTINT('search_date_modif_startday'); |
144 | -$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver |
|
144 | +$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver |
|
145 | 145 | $search_date_modif_endmonth = GETPOSTINT('search_date_modif_endmonth'); |
146 | 146 | $search_date_modif_endyear = GETPOSTINT('search_date_modif_endyear'); |
147 | 147 | $search_date_modif_endday = GETPOSTINT('search_date_modif_endday'); |
148 | -$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver |
|
148 | +$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver |
|
149 | 149 | |
150 | 150 | $type = GETPOST('type', 'alpha'); |
151 | 151 | $place = GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : '0'; // $place is string id of table for Bar or Restaurant |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | |
319 | 319 | $object->fields = dol_sort_array($object->fields, 'position'); |
320 | 320 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
321 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
321 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
322 | 322 | |
323 | 323 | // Security check |
324 | 324 | $socid = GETPOSTINT('socid'); |
@@ -607,7 +607,7 @@ discard block |
||
607 | 607 | if ($searchCategoryCustomerOperator == 0) { |
608 | 608 | $searchCategoryCustomerSqlList[] = " EXISTS (SELECT ck.fk_soc FROM ".MAIN_DB_PREFIX."categorie_societe as ck WHERE s.rowid = ck.fk_soc AND ck.fk_categorie = ".((int) $searchCategoryCustomer).")"; |
609 | 609 | } else { |
610 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryCustomer); |
|
610 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryCustomer); |
|
611 | 611 | } |
612 | 612 | } |
613 | 613 | } |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | if ($searchCategorySupplierOperator == 0) { |
637 | 637 | $searchCategorySupplierSqlList[] = " EXISTS (SELECT ck.fk_soc FROM ".MAIN_DB_PREFIX."categorie_fournisseur as ck WHERE s.rowid = ck.fk_soc AND ck.fk_categorie = ".((int) $searchCategorySupplier).")"; |
638 | 638 | } else { |
639 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategorySupplier); |
|
639 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategorySupplier); |
|
640 | 640 | } |
641 | 641 | } |
642 | 642 | } |
@@ -1073,7 +1073,7 @@ discard block |
||
1073 | 1073 | $param .= '&search_date_modif_endday='.urlencode((string) ($search_date_modif_endday)); |
1074 | 1074 | } |
1075 | 1075 | if ($search_date_modif_end) { |
1076 | - $param .= '&search_date_modif_end=' . urlencode($search_date_modif_end); |
|
1076 | + $param .= '&search_date_modif_end='.urlencode($search_date_modif_end); |
|
1077 | 1077 | } |
1078 | 1078 | |
1079 | 1079 | // Add $param from extra fields |
@@ -1143,7 +1143,7 @@ discard block |
||
1143 | 1143 | if (!empty($socid)) { |
1144 | 1144 | $url .= '&socid='.$socid; |
1145 | 1145 | } |
1146 | - $newcardbutton = ''; |
|
1146 | + $newcardbutton = ''; |
|
1147 | 1147 | $newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition')); |
1148 | 1148 | $newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition')); |
1149 | 1149 | $newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url, '', $user->hasRight('societe', 'creer')); |
@@ -1253,7 +1253,7 @@ discard block |
||
1253 | 1253 | } |
1254 | 1254 | |
1255 | 1255 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
1256 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
1256 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
1257 | 1257 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
1258 | 1258 | $selectedfields .= ((count($arrayofmassactions) && $contextpage != 'poslist') ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
1259 | 1259 | |
@@ -1687,19 +1687,19 @@ discard block |
||
1687 | 1687 | print $hookmanager->resPrint; |
1688 | 1688 | if (!empty($arrayfields['s.datec']['checked'])) { |
1689 | 1689 | print_liste_field_titre($arrayfields['s.datec']['label'], $_SERVER["PHP_SELF"], "s.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); |
1690 | - $totalarray['nbfield']++; // For the column action |
|
1690 | + $totalarray['nbfield']++; // For the column action |
|
1691 | 1691 | } |
1692 | 1692 | if (!empty($arrayfields['s.tms']['checked'])) { |
1693 | 1693 | print_liste_field_titre($arrayfields['s.tms']['label'], $_SERVER["PHP_SELF"], "s.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); |
1694 | - $totalarray['nbfield']++; // For the column action |
|
1694 | + $totalarray['nbfield']++; // For the column action |
|
1695 | 1695 | } |
1696 | 1696 | if (!empty($arrayfields['s.status']['checked'])) { |
1697 | 1697 | print_liste_field_titre($arrayfields['s.status']['label'], $_SERVER["PHP_SELF"], "s.status", "", $param, '', $sortfield, $sortorder, 'center '); |
1698 | - $totalarray['nbfield']++; // For the column action |
|
1698 | + $totalarray['nbfield']++; // For the column action |
|
1699 | 1699 | } |
1700 | 1700 | if (!empty($arrayfields['s.import_key']['checked'])) { |
1701 | 1701 | print_liste_field_titre($arrayfields['s.import_key']['label'], $_SERVER["PHP_SELF"], "s.import_key", "", $param, '', $sortfield, $sortorder, 'center '); |
1702 | - $totalarray['nbfield']++; // For the column action |
|
1702 | + $totalarray['nbfield']++; // For the column action |
|
1703 | 1703 | } |
1704 | 1704 | // Action column |
1705 | 1705 | if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
@@ -45,11 +45,11 @@ discard block |
||
45 | 45 | // Get parameters |
46 | 46 | $id = GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('socid'); |
47 | 47 | |
48 | -$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... |
|
48 | +$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... |
|
49 | 49 | $show_files = GETPOSTINT('show_files'); |
50 | -$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'websitelist'; // To manage different context of search |
|
51 | -$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
|
52 | -$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
|
50 | +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'websitelist'; // To manage different context of search |
|
51 | +$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
|
52 | +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
|
53 | 53 | $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
54 | 54 | $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
55 | 55 | $mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | } |
420 | 420 | |
421 | 421 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
422 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
422 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
423 | 423 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
424 | 424 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
425 | 425 | |
@@ -490,7 +490,7 @@ discard block |
||
490 | 490 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
491 | 491 | $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
492 | 492 | } |
493 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
493 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
494 | 494 | if (!empty($arrayfields['t.'.$key]['checked'])) { |
495 | 495 | print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist']))."\n"; |
496 | 496 | $totalarray['nbfield']++; |
@@ -38,15 +38,15 @@ discard block |
||
38 | 38 | $langs->loadLangs(array('mrp', 'other')); |
39 | 39 | |
40 | 40 | $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'create'/'add', 'edit'/'update', 'view', ... |
41 | -$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) |
|
42 | -$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? |
|
43 | -$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation |
|
44 | -$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button |
|
45 | -$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
|
41 | +$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) |
|
42 | +$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? |
|
43 | +$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation |
|
44 | +$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button |
|
45 | +$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
|
46 | 46 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search |
47 | -$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
|
48 | -$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
|
49 | -$mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) |
|
47 | +$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
|
48 | +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
|
49 | +$mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) |
|
50 | 50 | |
51 | 51 | $id = GETPOSTINT('id'); |
52 | 52 | $ref = GETPOST('ref', 'alpha'); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $object = new Workstation($db); |
69 | 69 | $extrafields = new ExtraFields($db); |
70 | 70 | $diroutputmassaction = $conf->workstation->dir_output.'/temp/massgeneration/'.$user->id; |
71 | -$hookmanager->initHooks(array('workstationlist')); // Note that conf->hooks_modules contains array |
|
71 | +$hookmanager->initHooks(array('workstationlist')); // Note that conf->hooks_modules contains array |
|
72 | 72 | |
73 | 73 | // Fetch optionals attributes and labels |
74 | 74 | $extrafields->fetch_name_optionals_label($object->table_element); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | // Default sort order (if not yet defined by previous GETPOST) |
80 | 80 | if (!$sortfield) { |
81 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
81 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
82 | 82 | $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. |
83 | 83 | } |
84 | 84 | if (!$sortorder) { |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | |
151 | 151 | $object->fields = dol_sort_array($object->fields, 'position'); |
152 | 152 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
153 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
153 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
154 | 154 | |
155 | 155 | $permissiontoread = $user->hasRight('workstation', 'workstation', 'read'); |
156 | 156 | $permissiontoadd = $user->hasRight('workstation', 'workstation', 'write'); |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | $sql .= "t.".$db->escape($key).", "; |
319 | 319 | } |
320 | 320 | // Add fields from extrafields |
321 | -if (! empty($extrafields->attributes[$object->table_element]['label'])) { |
|
321 | +if (!empty($extrafields->attributes[$object->table_element]['label'])) { |
|
322 | 322 | foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { |
323 | 323 | // @phan-suppress-next-line PhanTypeArraySuspiciousNullable |
324 | 324 | $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | } |
327 | 327 | // Add groupby from hooks |
328 | 328 | $parameters = array(); |
329 | -$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook |
|
329 | +$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook |
|
330 | 330 | $sql .= $hookmanager->resPrint; |
331 | 331 | $sql = preg_replace('/,\s*$/', '', $sql); |
332 | 332 | |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | } |
496 | 496 | |
497 | 497 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
498 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
498 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
499 | 499 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
500 | 500 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
501 | 501 | |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
603 | 603 | $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
604 | 604 | } |
605 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
605 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
606 | 606 | if (!empty($arrayfields['t.'.$key]['checked'])) { |
607 | 607 | print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist']))."\n"; |
608 | 608 | $totalarray['nbfield']++; |
@@ -611,12 +611,12 @@ discard block |
||
611 | 611 | |
612 | 612 | // usergroups |
613 | 613 | if (!empty($arrayfields['wug.fk_usergroup']['checked'])) { |
614 | - print getTitleFieldOfList($arrayfields['wug.fk_usergroup']['label'], 0, $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, '') . "\n"; |
|
614 | + print getTitleFieldOfList($arrayfields['wug.fk_usergroup']['label'], 0, $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, '')."\n"; |
|
615 | 615 | } |
616 | 616 | |
617 | 617 | // resources |
618 | 618 | if (!empty($arrayfields['wr.fk_resource']['checked'])) { |
619 | - print getTitleFieldOfList($arrayfields['wr.fk_resource']['label'], 0, $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, '') . "\n"; |
|
619 | + print getTitleFieldOfList($arrayfields['wr.fk_resource']['label'], 0, $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, '')."\n"; |
|
620 | 620 | } |
621 | 621 | |
622 | 622 | // Extra fields |
@@ -762,11 +762,11 @@ discard block |
||
762 | 762 | foreach ($object->usergroups as $id_group) { |
763 | 763 | $g = new UserGroup($db); |
764 | 764 | $g->fetch($id_group); |
765 | - $toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories'.($cssforli ? ' '.$cssforli : '').'" style="background: #bbb">' . $g->getNomUrl(1, '', 0, 'categtextwhite') . '</li>'; |
|
765 | + $toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories'.($cssforli ? ' '.$cssforli : '').'" style="background: #bbb">'.$g->getNomUrl(1, '', 0, 'categtextwhite').'</li>'; |
|
766 | 766 | } |
767 | 767 | |
768 | 768 | print '<td class="minwidth300imp nowraponall">'; |
769 | - print '<div class="select2-container-multi-dolibarr"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>'; |
|
769 | + print '<div class="select2-container-multi-dolibarr"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>'; |
|
770 | 770 | print '</td>'; |
771 | 771 | } |
772 | 772 | |
@@ -781,11 +781,11 @@ discard block |
||
781 | 781 | foreach ($object->resources as $id_resource) { |
782 | 782 | $r = new Dolresource($db); |
783 | 783 | $r->fetch($id_resource); |
784 | - $toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories'.($cssforli ? ' '.$cssforli : '').'" style="background: #bbb">' . $r->getNomUrl(1, '', '', 0, 'categtextwhite') . '</li>'; |
|
784 | + $toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories'.($cssforli ? ' '.$cssforli : '').'" style="background: #bbb">'.$r->getNomUrl(1, '', '', 0, 'categtextwhite').'</li>'; |
|
785 | 785 | } |
786 | 786 | |
787 | 787 | print '<td class="minwidth300imp">'; |
788 | - print '<div class="select2-container-multi-dolibarr"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>'; |
|
788 | + print '<div class="select2-container-multi-dolibarr"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>'; |
|
789 | 789 | print '</td>'; |
790 | 790 | } |
791 | 791 |