@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $offsetunit = GETPOST('offsetunittype_duration', 'aZ09'); |
76 | 76 | $remindertype = GETPOST('selectremindertype', 'aZ09'); |
77 | 77 | $modelmail = GETPOSTINT('actioncommsendmodel_mail'); |
78 | -$complete = GETPOST('complete', 'alpha'); // 'na' must be allowed |
|
78 | +$complete = GETPOST('complete', 'alpha'); // 'na' must be allowed |
|
79 | 79 | $private = GETPOST('private', 'alphanohtml'); |
80 | 80 | if ($complete == 'na' || $complete == -2) { |
81 | 81 | $complete = -1; |
@@ -610,12 +610,12 @@ discard block |
||
610 | 610 | if ($selectedrecurrulefreq == 'WEEKLY' && !empty($selectedrecurrulebyday)) { |
611 | 611 | $firstdatearray = dol_get_first_day_week(GETPOSTINT("apday"), GETPOSTINT("apmonth"), GETPOSTINT("apyear")); |
612 | 612 | $datep = dol_mktime($fulldayevent ? '00' : GETPOSTINT("aphour"), $fulldayevent ? '00' : GETPOSTINT("apmin"), $fulldayevent ? '00' : GETPOSTINT("apsec"), $firstdatearray['month'], $firstdatearray['first_day'], $firstdatearray['year'], $tzforfullday ? $tzforfullday : 'tzuserrel'); |
613 | - $datep = dol_time_plus_duree($datep, $selectedrecurrulebyday + 6, 'd');//We begin the week after |
|
613 | + $datep = dol_time_plus_duree($datep, $selectedrecurrulebyday + 6, 'd'); //We begin the week after |
|
614 | 614 | $dayoffset = 7; |
615 | 615 | $monthoffset = 0; |
616 | 616 | } elseif ($selectedrecurrulefreq == 'MONTHLY' && !empty($selectedrecurrulebymonthday)) { |
617 | 617 | $firstday = $selectedrecurrulebymonthday; |
618 | - $firstmonth = GETPOST("apday") > $selectedrecurrulebymonthday ? GETPOSTINT("apmonth") + 1 : GETPOSTINT("apmonth");//We begin the week after |
|
618 | + $firstmonth = GETPOST("apday") > $selectedrecurrulebymonthday ? GETPOSTINT("apmonth") + 1 : GETPOSTINT("apmonth"); //We begin the week after |
|
619 | 619 | $datep = dol_mktime($fulldayevent ? '00' : GETPOSTINT("aphour"), $fulldayevent ? '00' : GETPOSTINT("apmin"), $fulldayevent ? '00' : GETPOSTINT("apsec"), $firstmonth, $firstday, GETPOSTINT("apyear"), $tzforfullday ? $tzforfullday : 'tzuserrel'); |
620 | 620 | $dayoffset = 0; |
621 | 621 | $monthoffset = 1; |
@@ -819,7 +819,7 @@ discard block |
||
819 | 819 | reset($object->socpeopleassigned); |
820 | 820 | $object->contact_id = key($object->socpeopleassigned); |
821 | 821 | } |
822 | - $object->fk_project = GETPOSTINT("projectid"); |
|
822 | + $object->fk_project = GETPOSTINT("projectid"); |
|
823 | 823 | $object->note_private = trim(GETPOST("note", "restricthtml")); |
824 | 824 | |
825 | 825 | if (GETPOST("elementtype", 'alpha')) { |
@@ -1063,7 +1063,7 @@ discard block |
||
1063 | 1063 | if (empty($reshook) && GETPOST('actionmove', 'alpha') == 'mupdate') { |
1064 | 1064 | $error = 0; |
1065 | 1065 | |
1066 | - $shour = dol_print_date($object->datep, "%H", 'tzuserrel'); // We take the date visible by user $newdate is also date visible by user. |
|
1066 | + $shour = dol_print_date($object->datep, "%H", 'tzuserrel'); // We take the date visible by user $newdate is also date visible by user. |
|
1067 | 1067 | $smin = dol_print_date($object->datep, "%M", 'tzuserrel'); |
1068 | 1068 | |
1069 | 1069 | $newdate = GETPOST('newdate', 'alpha'); |
@@ -1273,7 +1273,7 @@ discard block |
||
1273 | 1273 | $default = getDolGlobalString('AGENDA_USE_EVENT_TYPE_DEFAULT', 'AC_RDV'); |
1274 | 1274 | print img_picto($langs->trans("ActionType"), 'square', 'class="fawidth30 inline-block" style="color: #ddd;"'); |
1275 | 1275 | $selectedvalue = GETPOSTISSET("actioncode") ? GETPOST("actioncode", 'aZ09') : ($object->type_code ? $object->type_code : $default); |
1276 | - print $formactions->select_type_actions($selectedvalue, "actioncode", "systemauto", 0, -1, 0, 1); // TODO Replace 0 with -2 in onlyautoornot |
|
1276 | + print $formactions->select_type_actions($selectedvalue, "actioncode", "systemauto", 0, -1, 0, 1); // TODO Replace 0 with -2 in onlyautoornot |
|
1277 | 1277 | print '</td></tr>'; |
1278 | 1278 | } |
1279 | 1279 | |
@@ -1587,7 +1587,7 @@ discard block |
||
1587 | 1587 | } |
1588 | 1588 | //var_dump('origin='.$origin.' originid='.$originid.' hasPermissionOnLinkedObject='.$hasPermissionOnLinkedObject); |
1589 | 1589 | |
1590 | - if (! in_array($origin, array('societe', 'project', 'task', 'user'))) { |
|
1590 | + if (!in_array($origin, array('societe', 'project', 'task', 'user'))) { |
|
1591 | 1591 | // We do not use link for object that already contains a hard coded field to make links with agenda events |
1592 | 1592 | print '<tr><td class="titlefieldcreate">' . $langs->trans("LinkedObject") . '</td>'; |
1593 | 1593 | print '<td colspan="3">'; |
@@ -1738,7 +1738,7 @@ discard block |
||
1738 | 1738 | $object->socpeopleassigned[$id] = array('id' => $tmpid); |
1739 | 1739 | } |
1740 | 1740 | $object->contact_id = GETPOSTINT("contactid"); |
1741 | - $object->fk_project = GETPOSTINT("projectid"); |
|
1741 | + $object->fk_project = GETPOSTINT("projectid"); |
|
1742 | 1742 | |
1743 | 1743 | $object->note_private = GETPOST("note", 'restricthtml'); |
1744 | 1744 | } |
@@ -1814,7 +1814,7 @@ discard block |
||
1814 | 1814 | if ($backtopage) { |
1815 | 1815 | print '<input type="hidden" name="backtopage" value="' . ($backtopage != '1' ? $backtopage : '') . '">'; |
1816 | 1816 | } |
1817 | - if (!getDolGlobalString('AGENDA_USE_EVENT_TYPE') && ! preg_match('/^TICKET_MSG_PRIVATE/', $object->code)) { |
|
1817 | + if (!getDolGlobalString('AGENDA_USE_EVENT_TYPE') && !preg_match('/^TICKET_MSG_PRIVATE/', $object->code)) { |
|
1818 | 1818 | print '<input type="hidden" name="actioncode" value="' . $object->type_code . '">'; |
1819 | 1819 | } |
1820 | 1820 | |
@@ -2187,7 +2187,7 @@ discard block |
||
2187 | 2187 | })'; |
2188 | 2188 | print '</script>' . "\n"; |
2189 | 2189 | |
2190 | - print '</div>'; // End of div for reminderparameters |
|
2190 | + print '</div>'; // End of div for reminderparameters |
|
2191 | 2191 | } |
2192 | 2192 | |
2193 | 2193 | print dol_get_fiche_end(); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | //if (! ($usergroup > 0) && ! ($filtert > 0)) $filtert = $user->id; |
57 | 57 | |
58 | 58 | // $showbirthday = empty($conf->use_javascript_ajax)?GETPOST("showbirthday","int"):1; |
59 | -$showbirthday = 0; // will be hidden here |
|
59 | +$showbirthday = 0; // will be hidden here |
|
60 | 60 | |
61 | 61 | // If not choice done on calendar owner, we filter on user. |
62 | 62 | if (empty($filtert) && !getDolGlobalString('AGENDA_ALL_CALENDARS')) { |
@@ -997,8 +997,8 @@ discard block |
||
997 | 997 | // We are in a particular day for $username, now we scan all events |
998 | 998 | foreach ($eventarray as $daykey => $notused) { |
999 | 999 | $annee = dol_print_date($daykey, '%Y', 'tzuserrel'); |
1000 | - $mois = dol_print_date($daykey, '%m', 'tzuserrel'); |
|
1001 | - $jour = dol_print_date($daykey, '%d', 'tzuserrel'); |
|
1000 | + $mois = dol_print_date($daykey, '%m', 'tzuserrel'); |
|
1001 | + $jour = dol_print_date($daykey, '%d', 'tzuserrel'); |
|
1002 | 1002 | |
1003 | 1003 | if ($day == $jour && (int) $month == (int) $mois && $year == $annee) { // Is it the day we are looking for when calling function ? |
1004 | 1004 | // Scan all event for this date |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | $mode = GETPOST('mode', 'aZ09'); |
59 | 59 | if (empty($mode) && preg_match('/show_/', $action)) { |
60 | - $mode = $action; // For backward compatibility |
|
60 | + $mode = $action; // For backward compatibility |
|
61 | 61 | } |
62 | 62 | $resourceid = GETPOSTINT("search_resourceid") ? GETPOSTINT("search_resourceid") : GETPOSTINT("resourceid"); |
63 | 63 | $pid = GETPOSTINT("search_projectid", 3) ? GETPOSTINT("search_projectid", 3) : GETPOSTINT("projectid", 3); |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | |
180 | 180 | $object->fields = dol_sort_array($object->fields, 'position'); |
181 | 181 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
182 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
182 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
183 | 183 | |
184 | 184 | $result = restrictedArea($user, 'agenda', 0, '', 'myactions'); |
185 | 185 | if ($user->socid && $socid) { |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | if (isModEnabled('category') && $user->hasRight('agenda', 'myactions', 'create')) { |
415 | 415 | $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"') . $langs->trans("AffectTag"); |
416 | 416 | } |
417 | -if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) { |
|
417 | +if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) { |
|
418 | 418 | $arrayofmassactions = array(); |
419 | 419 | } |
420 | 420 | $massactionbutton = $form->selectMassAction('', $arrayofmassactions); |
@@ -1156,8 +1156,8 @@ |
||
1156 | 1156 | // We are in a particular day for $username, now we scan all events |
1157 | 1157 | foreach ($eventarray as $daykey => $notused) { |
1158 | 1158 | $annee = dol_print_date($daykey, '%Y', 'tzuserrel'); |
1159 | - $mois = dol_print_date($daykey, '%m', 'tzuserrel'); |
|
1160 | - $jour = dol_print_date($daykey, '%d', 'tzuserrel'); |
|
1159 | + $mois = dol_print_date($daykey, '%m', 'tzuserrel'); |
|
1160 | + $jour = dol_print_date($daykey, '%d', 'tzuserrel'); |
|
1161 | 1161 | //var_dump("daykey=$daykey day=$day jour=$jour, month=$month mois=$mois, year=$year annee=$annee"); |
1162 | 1162 | |
1163 | 1163 |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | { |
86 | 86 | } |
87 | 87 | |
88 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
88 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
89 | 89 | /** |
90 | 90 | * Read text file, icalender text file |
91 | 91 | * |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public function read_file($file) |
96 | 96 | { |
97 | - // phpcs:enable |
|
97 | + // phpcs:enable |
|
98 | 98 | $this->file = $file; |
99 | 99 | $file_text = ''; |
100 | 100 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | return $file_text; // return all text |
112 | 112 | } |
113 | 113 | |
114 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
114 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
115 | 115 | /** |
116 | 116 | * Returns the number of calendar events |
117 | 117 | * |
@@ -119,11 +119,11 @@ discard block |
||
119 | 119 | */ |
120 | 120 | public function get_event_count() |
121 | 121 | { |
122 | - // phpcs:enable |
|
122 | + // phpcs:enable |
|
123 | 123 | return $this->event_count; |
124 | 124 | } |
125 | 125 | |
126 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
126 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
127 | 127 | /** |
128 | 128 | * Returns the number of to do |
129 | 129 | * |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | */ |
132 | 132 | public function get_todo_count() |
133 | 133 | { |
134 | - // phpcs:enable |
|
134 | + // phpcs:enable |
|
135 | 135 | return $this->todo_count; |
136 | 136 | } |
137 | 137 | |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | return $this->cal; |
262 | 262 | } |
263 | 263 | |
264 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
264 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
265 | 265 | /** |
266 | 266 | * Add to $this->ical array one value and key. |
267 | 267 | * |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | */ |
273 | 273 | public function add_to_array($type, $key, $value) |
274 | 274 | { |
275 | - // phpcs:enable |
|
275 | + // phpcs:enable |
|
276 | 276 | |
277 | 277 | //print 'type='.$type.' key='.$key.' value='.$value.'<br>'."\n"; |
278 | 278 | |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | $this->last_key = $key; |
325 | 325 | } |
326 | 326 | |
327 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
327 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
328 | 328 | /** |
329 | 329 | * Parse text "XXXX:value text some with : " and return array($key = "XXXX", $value="value"); |
330 | 330 | * |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | */ |
334 | 334 | public function retun_key_value($text) |
335 | 335 | { |
336 | - // phpcs:enable |
|
336 | + // phpcs:enable |
|
337 | 337 | /* |
338 | 338 | preg_match("/([^:]+)[:]([\w\W]+)/", $text, $matches); |
339 | 339 | |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | return explode(':', $text, 2); |
350 | 350 | } |
351 | 351 | |
352 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
352 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
353 | 353 | /** |
354 | 354 | * Parse RRULE return array |
355 | 355 | * |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | */ |
359 | 359 | public function ical_rrule($value) |
360 | 360 | { |
361 | - // phpcs:enable |
|
361 | + // phpcs:enable |
|
362 | 362 | $result = array(); |
363 | 363 | $rrule = explode(';', $value); |
364 | 364 | foreach ($rrule as $line) { |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | return $result; |
369 | 369 | } |
370 | 370 | |
371 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
371 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
372 | 372 | /** |
373 | 373 | * Return Unix time from ical date time format (YYYYMMDD[T]HHMMSS[Z] or YYYYMMDD[T]HHMMSS) |
374 | 374 | * |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | */ |
378 | 378 | public function ical_date_to_unix($ical_date) |
379 | 379 | { |
380 | - // phpcs:enable |
|
380 | + // phpcs:enable |
|
381 | 381 | $ical_date = str_replace('T', '', $ical_date); |
382 | 382 | $ical_date = str_replace('Z', '', $ical_date); |
383 | 383 | |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | return $ntime; // ntime is a GTM time |
394 | 394 | } |
395 | 395 | |
396 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
396 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
397 | 397 | /** |
398 | 398 | * Return unix date from iCal date format |
399 | 399 | * |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | */ |
404 | 404 | public function ical_dt_date($key, $value) |
405 | 405 | { |
406 | - // phpcs:enable |
|
406 | + // phpcs:enable |
|
407 | 407 | $return_value = array(); |
408 | 408 | |
409 | 409 | // Analyse TZID |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | return array($key, $return_value); |
425 | 425 | } |
426 | 426 | |
427 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
427 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
428 | 428 | /** |
429 | 429 | * Return sorted eventlist as array or false if calendar is empty |
430 | 430 | * |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | */ |
433 | 433 | public function get_sort_event_list() |
434 | 434 | { |
435 | - // phpcs:enable |
|
435 | + // phpcs:enable |
|
436 | 436 | $temp = $this->get_event_list(); |
437 | 437 | if (!empty($temp)) { |
438 | 438 | usort($temp, array(&$this, "ical_dtstart_compare")); |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | } |
443 | 443 | } |
444 | 444 | |
445 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
445 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
446 | 446 | /** |
447 | 447 | * Compare two unix timestamp |
448 | 448 | * |
@@ -452,11 +452,11 @@ discard block |
||
452 | 452 | */ |
453 | 453 | public function ical_dtstart_compare($a, $b) |
454 | 454 | { |
455 | - // phpcs:enable |
|
455 | + // phpcs:enable |
|
456 | 456 | return strnatcasecmp($a['DTSTART']['unixtime'], $b['DTSTART']['unixtime']); |
457 | 457 | } |
458 | 458 | |
459 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
459 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
460 | 460 | /** |
461 | 461 | * Return eventlist array (not sorted eventlist array) |
462 | 462 | * |
@@ -464,11 +464,11 @@ discard block |
||
464 | 464 | */ |
465 | 465 | public function get_event_list() |
466 | 466 | { |
467 | - // phpcs:enable |
|
467 | + // phpcs:enable |
|
468 | 468 | return (empty($this->cal['VEVENT']) ? array() : $this->cal['VEVENT']); |
469 | 469 | } |
470 | 470 | |
471 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
471 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
472 | 472 | /** |
473 | 473 | * Return freebusy array (not sort eventlist array) |
474 | 474 | * |
@@ -476,11 +476,11 @@ discard block |
||
476 | 476 | */ |
477 | 477 | public function get_freebusy_list() |
478 | 478 | { |
479 | - // phpcs:enable |
|
479 | + // phpcs:enable |
|
480 | 480 | return (empty($this->cal['VFREEBUSY']) ? array() : $this->cal['VFREEBUSY']); |
481 | 481 | } |
482 | 482 | |
483 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
483 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
484 | 484 | /** |
485 | 485 | * Return to do array (not sorted todo array) |
486 | 486 | * |
@@ -488,11 +488,11 @@ discard block |
||
488 | 488 | */ |
489 | 489 | public function get_todo_list() |
490 | 490 | { |
491 | - // phpcs:enable |
|
491 | + // phpcs:enable |
|
492 | 492 | return $this->cal['VTODO']; |
493 | 493 | } |
494 | 494 | |
495 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
495 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
496 | 496 | /** |
497 | 497 | * Return base calendar data |
498 | 498 | * |
@@ -500,11 +500,11 @@ discard block |
||
500 | 500 | */ |
501 | 501 | public function get_calender_data() |
502 | 502 | { |
503 | - // phpcs:enable |
|
503 | + // phpcs:enable |
|
504 | 504 | return $this->cal['VCALENDAR']; |
505 | 505 | } |
506 | 506 | |
507 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
507 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
508 | 508 | /** |
509 | 509 | * Return array with all data |
510 | 510 | * |
@@ -512,7 +512,7 @@ discard block |
||
512 | 512 | */ |
513 | 513 | public function get_all_data() |
514 | 514 | { |
515 | - // phpcs:enable |
|
515 | + // phpcs:enable |
|
516 | 516 | return $this->cal; |
517 | 517 | } |
518 | 518 | } |
@@ -969,7 +969,7 @@ discard block |
||
969 | 969 | } |
970 | 970 | } |
971 | 971 | |
972 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
972 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
973 | 973 | /** |
974 | 974 | * Initialize this->userassigned array with list of id of user assigned to event |
975 | 975 | * |
@@ -978,7 +978,7 @@ discard block |
||
978 | 978 | */ |
979 | 979 | public function fetch_userassigned($override = true) |
980 | 980 | { |
981 | - // phpcs:enable |
|
981 | + // phpcs:enable |
|
982 | 982 | $sql = "SELECT fk_actioncomm, element_type, fk_element, answer_status, mandatory, transparency"; |
983 | 983 | $sql .= " FROM " . MAIN_DB_PREFIX . "actioncomm_resources"; |
984 | 984 | $sql .= " WHERE element_type = 'user' AND fk_actioncomm = " . ((int) $this->id); |
@@ -996,9 +996,9 @@ discard block |
||
996 | 996 | while ($obj = $this->db->fetch_object($resql2)) { |
997 | 997 | if ($obj->fk_element > 0) { |
998 | 998 | $this->userassigned[$obj->fk_element] = array('id' => $obj->fk_element, |
999 | - 'mandatory' => $obj->mandatory, |
|
1000 | - 'answer_status' => $obj->answer_status, |
|
1001 | - 'transparency' => $obj->transparency); |
|
999 | + 'mandatory' => $obj->mandatory, |
|
1000 | + 'answer_status' => $obj->answer_status, |
|
1001 | + 'transparency' => $obj->transparency); |
|
1002 | 1002 | } |
1003 | 1003 | |
1004 | 1004 | if ($override === true) { |
@@ -1389,7 +1389,7 @@ discard block |
||
1389 | 1389 | } |
1390 | 1390 | } |
1391 | 1391 | |
1392 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1392 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1393 | 1393 | /** |
1394 | 1394 | * Load indicators for dashboard (this->nbtodo and this->nbtodolate) |
1395 | 1395 | * |
@@ -1399,7 +1399,7 @@ discard block |
||
1399 | 1399 | */ |
1400 | 1400 | public function load_board($user, $load_state_board = 0) |
1401 | 1401 | { |
1402 | - // phpcs:enable |
|
1402 | + // phpcs:enable |
|
1403 | 1403 | global $conf, $langs; |
1404 | 1404 | |
1405 | 1405 | if (empty($load_state_board)) { |
@@ -1526,7 +1526,7 @@ discard block |
||
1526 | 1526 | return $this->LibStatut($this->percentage, $mode, $hidenastatus, $this->datep); |
1527 | 1527 | } |
1528 | 1528 | |
1529 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1529 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1530 | 1530 | /** |
1531 | 1531 | * Return label of action status |
1532 | 1532 | * |
@@ -1538,7 +1538,7 @@ discard block |
||
1538 | 1538 | */ |
1539 | 1539 | public function LibStatut($percent, $mode, $hidenastatus = 0, $datestart = '') |
1540 | 1540 | { |
1541 | - // phpcs:enable |
|
1541 | + // phpcs:enable |
|
1542 | 1542 | global $langs; |
1543 | 1543 | |
1544 | 1544 | $labelStatus = $langs->transnoentitiesnoconv('StatusNotApplicable'); |
@@ -1942,7 +1942,7 @@ discard block |
||
1942 | 1942 | return 1; |
1943 | 1943 | } |
1944 | 1944 | |
1945 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1945 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1946 | 1946 | /** |
1947 | 1947 | * Export events from database into a cal file. |
1948 | 1948 | * |
@@ -1958,7 +1958,7 @@ discard block |
||
1958 | 1958 | { |
1959 | 1959 | global $hookmanager; |
1960 | 1960 | |
1961 | - // phpcs:enable |
|
1961 | + // phpcs:enable |
|
1962 | 1962 | global $conf, $langs, $dolibarr_main_url_root, $mysoc; |
1963 | 1963 | |
1964 | 1964 | require_once DOL_DOCUMENT_ROOT . "/core/lib/xcal.lib.php"; |
@@ -565,8 +565,8 @@ discard block |
||
565 | 565 | $sql .= "ip"; |
566 | 566 | $sql .= ") VALUES ("; |
567 | 567 | $sql .= "'(PROV)', "; |
568 | - $sql .= "'" . $this->db->idate($now) . "', "; // date creation |
|
569 | - $sql .= "'" . $this->db->idate($this->datep) . "', "; // date start event |
|
568 | + $sql .= "'" . $this->db->idate($now) . "', "; // date creation |
|
569 | + $sql .= "'" . $this->db->idate($this->datep) . "', "; // date start event |
|
570 | 570 | $sql .= (strval($this->datef) != '' ? "'" . $this->db->idate($this->datef) . "'" : "null") . ", "; |
571 | 571 | $sql .= ((isset($this->durationp) && $this->durationp >= 0 && $this->durationp != '') ? "'" . $this->db->escape($this->durationp) . "'" : "null") . ", "; // deprecated |
572 | 572 | $sql .= (isset($this->type_id) ? $this->type_id : "null") . ","; |
@@ -1335,7 +1335,7 @@ discard block |
||
1335 | 1335 | $sql .= " FROM " . MAIN_DB_PREFIX . "actioncomm as a"; |
1336 | 1336 | // Fields from hook |
1337 | 1337 | $parameters = array('sql' => &$sql, 'socid' => $socid, 'fk_element' => $fk_element, 'elementtype' => $elementtype); |
1338 | - $reshook = $hookmanager->executeHooks('getActionsListFrom', $parameters); // Note that $action and $object may have been modified by hook |
|
1338 | + $reshook = $hookmanager->executeHooks('getActionsListFrom', $parameters); // Note that $action and $object may have been modified by hook |
|
1339 | 1339 | if (!empty($hookmanager->resPrint)) { |
1340 | 1340 | $sql .= $hookmanager->resPrint; |
1341 | 1341 | } |
@@ -1359,7 +1359,7 @@ discard block |
||
1359 | 1359 | } |
1360 | 1360 | // Fields where hook |
1361 | 1361 | $parameters = array('sql' => &$sql, 'socid' => $socid, 'fk_element' => $fk_element, 'elementtype' => $elementtype); |
1362 | - $reshook = $hookmanager->executeHooks('getActionsListWhere', $parameters); // Note that $action and $object may have been modified by hook |
|
1362 | + $reshook = $hookmanager->executeHooks('getActionsListWhere', $parameters); // Note that $action and $object may have been modified by hook |
|
1363 | 1363 | if (!empty($hookmanager->resPrint)) { |
1364 | 1364 | $sql .= $hookmanager->resPrint; |
1365 | 1365 | } |
@@ -1436,7 +1436,7 @@ discard block |
||
1436 | 1436 | |
1437 | 1437 | $resql = $this->db->query($sql); |
1438 | 1438 | if ($resql) { |
1439 | - $response = null; // Ensure the variable is defined |
|
1439 | + $response = null; // Ensure the variable is defined |
|
1440 | 1440 | if (empty($load_state_board)) { |
1441 | 1441 | $agenda_static = new ActionComm($this->db); |
1442 | 1442 | $response = new WorkboardResponse(); |
@@ -1740,8 +1740,8 @@ discard block |
||
1740 | 1740 | } |
1741 | 1741 | if (!empty($this->note_private)) { |
1742 | 1742 | $tooltip .= '<br><br><b>' . $langs->trans('Description') . ':</b><br>'; |
1743 | - $texttoshow = dolGetFirstLineOfText($this->note_private, 8); // Try to limit length of content |
|
1744 | - $tooltip .= '<div class="tenlinesmax">'; // Restrict height of content into the tooltip |
|
1743 | + $texttoshow = dolGetFirstLineOfText($this->note_private, 8); // Try to limit length of content |
|
1744 | + $tooltip .= '<div class="tenlinesmax">'; // Restrict height of content into the tooltip |
|
1745 | 1745 | $tooltip .= (dol_textishtml($texttoshow) ? str_replace(array("\r", "\n"), "", $texttoshow) : str_replace(array("\r", "\n"), '<br>', $texttoshow)); |
1746 | 1746 | $tooltip .= '</div>'; |
1747 | 1747 | } |
@@ -2625,7 +2625,7 @@ discard block |
||
2625 | 2625 | //Select all action comm reminders |
2626 | 2626 | $sql = "SELECT rowid as id FROM " . MAIN_DB_PREFIX . "actioncomm_reminder"; |
2627 | 2627 | $sql .= " WHERE typeremind = 'email'"; |
2628 | - $sql .= " AND status = 0"; // 0=No yet sent, -1=Error. TODO Include reminder in error once we can count number of error, so we can try 5 times and not more on errors. |
|
2628 | + $sql .= " AND status = 0"; // 0=No yet sent, -1=Error. TODO Include reminder in error once we can count number of error, so we can try 5 times and not more on errors. |
|
2629 | 2629 | $sql .= " AND dateremind <= '" . $this->db->idate($now) . "'"; |
2630 | 2630 | $sql .= " AND entity IN (" . getEntity('actioncomm') . ")"; |
2631 | 2631 | $sql .= $this->db->order("dateremind", "ASC"); |
@@ -2634,7 +2634,7 @@ discard block |
||
2634 | 2634 | if ($resql) { |
2635 | 2635 | require_once constant('DOL_DOCUMENT_ROOT') . '/core/class/html.formmail.class.php'; |
2636 | 2636 | $formmail = new FormMail($this->db); |
2637 | - $to = null; // Ensure 'to' is defined for static analysis |
|
2637 | + $to = null; // Ensure 'to' is defined for static analysis |
|
2638 | 2638 | |
2639 | 2639 | while ($obj = $this->db->fetch_object($resql)) { |
2640 | 2640 | $res = $actionCommReminder->fetch($obj->id); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | } |
146 | 146 | } |
147 | 147 | |
148 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
148 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
149 | 149 | /** |
150 | 150 | * Return list of event types: array(id=>label) or array(code=>label) |
151 | 151 | * |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | */ |
160 | 160 | public function liste_array($active = '', $idorcode = 'id', $excludetype = '', $onlyautoornot = 0, $morefilter = '', $shortlabel = 0) |
161 | 161 | { |
162 | - // phpcs:enable |
|
162 | + // phpcs:enable |
|
163 | 163 | global $langs, $conf, $user; |
164 | 164 | $langs->load("commercial"); |
165 | 165 |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | } |
264 | 264 | } |
265 | 265 | // For the case type is not 'system...' neither 'module', we just check module is on |
266 | - if (! in_array($obj->type, array('system', 'systemauto', 'module', 'moduleauto'))) { |
|
266 | + if (!in_array($obj->type, array('system', 'systemauto', 'module', 'moduleauto'))) { |
|
267 | 267 | $tmpmodule = $obj->module; |
268 | 268 | //var_dump($tmpmodule); |
269 | 269 | if ($tmpmodule && isset($conf->$tmpmodule) && isModEnabled($tmpmodule)) { |
@@ -351,10 +351,10 @@ discard block |
||
351 | 351 | $idorcode = 'all'; |
352 | 352 | } |
353 | 353 | $TType = $TSystem[$idorcode]; |
354 | - if (! empty($TSystemAuto[$idorcode])) { |
|
354 | + if (!empty($TSystemAuto[$idorcode])) { |
|
355 | 355 | $TType = array_merge($TType, $TSystemAuto[$idorcode]); |
356 | 356 | } |
357 | - if (! empty($TModule[$idorcode])) { |
|
357 | + if (!empty($TModule[$idorcode])) { |
|
358 | 358 | $TType = array_merge($TType, $TModule[$idorcode]); |
359 | 359 | } |
360 | 360 | $this->liste_array = $TType; |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | return $this->LibStatut($this->status, $mode); |
227 | 227 | } |
228 | 228 | |
229 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
229 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
230 | 230 | /** |
231 | 231 | * Return the status |
232 | 232 | * |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | */ |
237 | 237 | public static function LibStatut($status, $mode = 0) |
238 | 238 | { |
239 | - // phpcs:enable |
|
239 | + // phpcs:enable |
|
240 | 240 | global $langs; |
241 | 241 | |
242 | 242 | $labelStatus = $langs->transnoentitiesnoconv('ToDo'); |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | return $event; |
340 | 340 | } |
341 | 341 | |
342 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
342 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
343 | 343 | /** |
344 | 344 | * Clean sensible object datas |
345 | 345 | * |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | */ |
349 | 349 | protected function _cleanObjectDatas($object) |
350 | 350 | { |
351 | - // phpcs:enable |
|
351 | + // phpcs:enable |
|
352 | 352 | $object = parent::_cleanObjectDatas($object); |
353 | 353 | |
354 | 354 | unset($object->note); // alreaydy into note_private |