From 1414f72794c6850bb950f016b02f2559069d9e57 Mon Sep 17 00:00:00 2001 From: lvessiller Date: Wed, 13 Jul 2022 16:37:50 +0200 Subject: [PATCH 01/12] NEW color in action list --- htdocs/admin/agenda_other.php | 88 +++++++++++++++++++++++++++++++++-- htdocs/comm/action/list.php | 32 ++++++++++++- 2 files changed, 116 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index 1014d40de50..3f976efc784 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -53,6 +53,9 @@ $type = 'action'; * Actions */ +$error = 0; +$errors = array(); + include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; $reg = array(); @@ -109,7 +112,36 @@ if ($action == 'set') { } else { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); } -} elseif ($action == 'specimen') { // For orders + +} elseif ($action == 'setcolors') { + $event_color = preg_replace('/[^0-9a-f#]/i', '', (string) GETPOST('event_past_color', 'alphanohtml')); + $res = dolibarr_set_const($db, 'AGENDA_EVENT_PAST_COLOR', $event_color, 'chaine', 0, '', $conf->entity); + if (!$res > 0) { + $error++; + $errors[] = $db->lasterror(); + } + + $event_color = preg_replace('/[^0-9a-f#]/i', '', (string) GETPOST('event_progress_color', 'alphanohtml')); + $res = dolibarr_set_const($db, 'AGENDA_EVENT_PROGRESS_COLOR', $event_color, 'chaine', 0, '', $conf->entity); + if (!$res > 0) { + $error++; + $errors[] = $db->lasterror(); + } + + $event_color = preg_replace('/[^0-9a-f#]/i', '', (string) GETPOST('event_future_color', 'alphanohtml')); + $res = dolibarr_set_const($db, 'AGENDA_EVENT_FUTURE_COLOR', $event_color, 'chaine', 0, '', $conf->entity); + if (!$res > 0) { + $error++; + $errors[] = $db->lasterror(); + } + + if ($error) { + setEventMessages('', $errors, 'errors'); + } else { + setEventMessage($langs->trans('SetupSaved')); + } +} +elseif ($action == 'specimen') { // For orders $modele = GETPOST('module', 'alpha'); $commande = new CommandeFournisseur($db); @@ -192,9 +224,10 @@ print dol_get_fiche_head($head, 'other', $langs->trans("Agenda"), -1, 'action'); /* - * Documents models for supplier orders + * Miscellaneous */ +print load_fiche_titre($langs->trans('Miscellaneous'), '', ''); // Define array def of models $def = array(); @@ -394,7 +427,54 @@ print ''."\n"; print ''; -print dol_get_fiche_end(); +print $form->buttonsSaveCancel("Save", ''); + +print ''; + + +/* + * User interface (colors) + */ + +print load_fiche_titre($langs->trans('UserInterface'), '', ''); + +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +$formother = new FormOther($db); + +print '
'; +print ''; +print ''; + +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; + +// AGENDA_EVENT_PAST_COLOR +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; +// AGENDA_EVENT_PROGRESS_COLOR +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; +// AGENDA_EVENT_FUTURE_COLOR +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; + +print '
'.$langs->trans("Parameters").' '.$langs->trans("Value").'
'.$langs->trans('AGENDA_EVENT_PAST_COLOR').' '."\n"; +print $formother->selectColor($conf->global->AGENDA_EVENT_PAST_COLOR, 'event_past_color'); +print '
'.$langs->trans('AGENDA_EVENT_PROGRESS_COLOR').' '."\n"; +print $formother->selectColor($conf->global->AGENDA_EVENT_PROGRESS_COLOR, 'event_progress_color'); +print '
'.$langs->trans('AGENDA_EVENT_FUTURE_COLOR').' '."\n"; +print $formother->selectColor($conf->global->AGENDA_EVENT_FUTURE_COLOR, 'event_future_color'); +print '
'; print $form->buttonsSaveCancel("Save", ''); @@ -402,6 +482,8 @@ print '
'; print "
"; +print dol_get_fiche_end(); + // End of page llxFooter(); $db->close(); diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index dd877e903e4..0dadd28ff9e 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -889,6 +889,7 @@ $i = 0; //$savnbfield = $totalarray['nbfield']; //$totalarray['nbfield'] = 0; $imaxinloop = ($limit ? min($num, $limit) : $num); +$today_start_date_time = dol_now(); while ($i < $imaxinloop) { $obj = $db->fetch_object($resql); if (empty($obj)) { @@ -923,7 +924,36 @@ while ($i < $imaxinloop) { $actionstatic->fetchResources(); } - print ''; + // get event color + $event_color = ''; + $event_more_class = ''; + $event_start_date_time = $actionstatic->datep; + if ($obj->fulldayevent) { + $today_start_date_time = dol_mktime(0, 0, 0, date('m', $today_start_date_time), date('d', $today_start_date_time), date('Y', $today_start_date_time)); + } + if ($event_start_date_time > $today_start_date_time) { + // future event + $event_color = $conf->global->AGENDA_EVENT_FUTURE_COLOR; + $event_more_class = 'event-future'; + } else { + // check event end date + $event_end_date_time = $db->jdate($obj->dp2); + if ($event_end_date_time != null && $event_end_date_time < $today_start_date_time) { + // past event + $event_color = $conf->global->AGENDA_EVENT_PAST_COLOR; + $event_more_class = 'event-past'; + } elseif ($event_end_date_time == null && $event_start_date_time < $today_start_date_time) { + // past event + $event_color = $conf->global->AGENDA_EVENT_PAST_COLOR; + $event_more_class = 'event-past'; + } else { + // today event + $event_color = $conf->global->AGENDA_EVENT_PROGRESS_COLOR; + $event_more_class = 'event-progress'; + } + } + + print ''; // Ref if (!empty($arrayfields['a.id']['checked'])) { From cda6e9184df96afe1d4fb54beec9aae1ef12c5cc Mon Sep 17 00:00:00 2001 From: lvessiller Date: Wed, 13 Jul 2022 16:52:57 +0200 Subject: [PATCH 02/12] NEW color in action list and translated --- htdocs/admin/agenda_other.php | 10 +++++----- htdocs/comm/action/list.php | 6 +++--- htdocs/langs/en_US/admin.lang | 5 ++++- htdocs/langs/fr_FR/admin.lang | 5 ++++- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index 3f976efc784..08858252032 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -121,8 +121,8 @@ if ($action == 'set') { $errors[] = $db->lasterror(); } - $event_color = preg_replace('/[^0-9a-f#]/i', '', (string) GETPOST('event_progress_color', 'alphanohtml')); - $res = dolibarr_set_const($db, 'AGENDA_EVENT_PROGRESS_COLOR', $event_color, 'chaine', 0, '', $conf->entity); + $event_color = preg_replace('/[^0-9a-f#]/i', '', (string) GETPOST('event_current_color', 'alphanohtml')); + $res = dolibarr_set_const($db, 'AGENDA_EVENT_CURRENT_COLOR', $event_color, 'chaine', 0, '', $conf->entity); if (!$res > 0) { $error++; $errors[] = $db->lasterror(); @@ -459,12 +459,12 @@ print ' '."\n"; print ''."\n"; print $formother->selectColor($conf->global->AGENDA_EVENT_PAST_COLOR, 'event_past_color'); print ''."\n"; -// AGENDA_EVENT_PROGRESS_COLOR +// AGENDA_EVENT_CURRENT_COLOR print ''."\n"; -print ''.$langs->trans('AGENDA_EVENT_PROGRESS_COLOR').''."\n"; +print ''.$langs->trans('AGENDA_EVENT_CURRENT_COLOR').''."\n"; print ' '."\n"; print ''."\n"; -print $formother->selectColor($conf->global->AGENDA_EVENT_PROGRESS_COLOR, 'event_progress_color'); +print $formother->selectColor($conf->global->AGENDA_EVENT_CURRENT_COLOR, 'event_current_color'); print ''."\n"; // AGENDA_EVENT_FUTURE_COLOR print ''."\n"; diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 0dadd28ff9e..ec42c0257af 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -947,9 +947,9 @@ while ($i < $imaxinloop) { $event_color = $conf->global->AGENDA_EVENT_PAST_COLOR; $event_more_class = 'event-past'; } else { - // today event - $event_color = $conf->global->AGENDA_EVENT_PROGRESS_COLOR; - $event_more_class = 'event-progress'; + // current event + $event_color = $conf->global->AGENDA_EVENT_CURRENT_COLOR; + $event_more_class = 'event-current'; } } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 813c7a4faa0..07cd5da86a9 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1806,6 +1806,9 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view +AGENDA_EVENT_PAST_COLOR=Past event color +AGENDA_EVENT_CURRENT_COLOR=Current event color +AGENDA_EVENT_FUTURE_COLOR=Future event color AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (When remind date is reached, a popup is shown by the browser. Each user can disable such notifications from its browser notification setup). AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -2284,4 +2287,4 @@ AlwaysEnabled=Always Enabled DoesNotWorkWithAllThemes=Will not work with all themes NoName=No name ShowAdvancedOptions= Show advanced options -HideAdvancedoptions= Hide advanced options \ No newline at end of file +HideAdvancedoptions= Hide advanced options diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 3c653717801..8c9424546e9 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -1806,6 +1806,9 @@ AGENDA_USE_EVENT_TYPE=Utiliser les types d'événements (gérés dans le menu Co AGENDA_USE_EVENT_TYPE_DEFAULT=Configurez automatiquement cette valeur par défaut pour le type d'événement dans le formulaire de création d'événement. AGENDA_DEFAULT_FILTER_TYPE=Positionner automatiquement ce type d'événement dans le filtre de recherche de la vue agenda AGENDA_DEFAULT_FILTER_STATUS=Positionner automatiquement ce statut d'événement dans le filtre de recherche de la vue agenda +AGENDA_EVENT_PAST_COLOR=Couleur de l'événement passé +AGENDA_EVENT_CURRENT_COLOR=Couleur de l'événement en cours +AGENDA_EVENT_FUTURE_COLOR=Couleur de l'événement futur AGENDA_DEFAULT_VIEW=Quel onglet voulez-vous voir ouvrir par défaut quand on choisit le menu Agenda AGENDA_REMINDER_BROWSER=Activer le rappel d'événement sur le navigateur de l'utilisateur (lorsque la date de l'événement est atteinte, une popup est affichée sur la navigateur. Chaque utilisateur peut désactiver de telles notification depuis la configuration des notifications de son navigateur) AGENDA_REMINDER_BROWSER_SOUND=Activer les notifications sonores. @@ -2267,4 +2270,4 @@ DarkThemeMode=Mode thème sombre AlwaysDisabled=Toujours désactivé AccordingToBrowser=Selon le navigateur AlwaysEnabled=Toujours activé -DoesNotWorkWithAllThemes=Ne fonctionne pas avec tous les thèmes \ No newline at end of file +DoesNotWorkWithAllThemes=Ne fonctionne pas avec tous les thèmes From 0a82efce07b3d28a396995d25d5a2a32e3b8f0c3 Mon Sep 17 00:00:00 2001 From: lvessiller Date: Wed, 13 Jul 2022 17:30:08 +0200 Subject: [PATCH 03/12] FIX reload stickler-ci From f69d5924498cc1e1eaed24f48eea42d39a1fb23f Mon Sep 17 00:00:00 2001 From: lvessiller Date: Wed, 13 Jul 2022 17:38:18 +0200 Subject: [PATCH 04/12] FIX stickler-ci --- htdocs/admin/agenda_other.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index 08858252032..7c2c6640277 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -112,7 +112,6 @@ if ($action == 'set') { } else { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); } - } elseif ($action == 'setcolors') { $event_color = preg_replace('/[^0-9a-f#]/i', '', (string) GETPOST('event_past_color', 'alphanohtml')); $res = dolibarr_set_const($db, 'AGENDA_EVENT_PAST_COLOR', $event_color, 'chaine', 0, '', $conf->entity); @@ -140,8 +139,7 @@ if ($action == 'set') { } else { setEventMessage($langs->trans('SetupSaved')); } -} -elseif ($action == 'specimen') { // For orders +} elseif ($action == 'specimen') { // For orders $modele = GETPOST('module', 'alpha'); $commande = new CommandeFournisseur($db); From 161958d34613d1bcc9ffb30f0f61b9ec440ac957 Mon Sep 17 00:00:00 2001 From: lvessiller Date: Thu, 21 Jul 2022 10:56:03 +0200 Subject: [PATCH 05/12] NEW color for start date and owner --- htdocs/comm/action/list.php | 48 +++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index ec42c0257af..096771c9ea7 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -890,6 +890,7 @@ $i = 0; //$totalarray['nbfield'] = 0; $imaxinloop = ($limit ? min($num, $limit) : $num); $today_start_date_time = dol_now(); +$cache_user_list = array(); while ($i < $imaxinloop) { $obj = $db->fetch_object($resql); if (empty($obj)) { @@ -924,36 +925,54 @@ while ($i < $imaxinloop) { $actionstatic->fetchResources(); } - // get event color - $event_color = ''; + // cache of user list (owners) + if ($obj->fk_user_action > 0 && !isset($cache_user_list[$obj->fk_user_action])) { + $res = $userstatic->fetch($obj->fk_user_action); + if ($res > 0) { + $cache_user_list[$obj->fk_user_action] = $userstatic; + } + } + + // get event style for user owner + $event_owner_style = ''; + // We decide to choose color of owner of event (event->userownerid is user id of owner, event->userassigned contains all users assigned to event) + if ($cache_user_list[$obj->fk_user_action]->color != '') { + $event_owner_style .= 'border-left: #' . $cache_user_list[$obj->fk_user_action]->color . ' 5px solid;'; + } + + // get event style for start date $event_more_class = ''; + $event_start_date_style = ''; $event_start_date_time = $actionstatic->datep; if ($obj->fulldayevent) { $today_start_date_time = dol_mktime(0, 0, 0, date('m', $today_start_date_time), date('d', $today_start_date_time), date('Y', $today_start_date_time)); } if ($event_start_date_time > $today_start_date_time) { // future event - $event_color = $conf->global->AGENDA_EVENT_FUTURE_COLOR; $event_more_class = 'event-future'; + $event_start_date_color = $conf->global->AGENDA_EVENT_FUTURE_COLOR; } else { // check event end date $event_end_date_time = $db->jdate($obj->dp2); if ($event_end_date_time != null && $event_end_date_time < $today_start_date_time) { // past event - $event_color = $conf->global->AGENDA_EVENT_PAST_COLOR; $event_more_class = 'event-past'; + $event_start_date_color = $conf->global->AGENDA_EVENT_PAST_COLOR; } elseif ($event_end_date_time == null && $event_start_date_time < $today_start_date_time) { // past event - $event_color = $conf->global->AGENDA_EVENT_PAST_COLOR; $event_more_class = 'event-past'; + $event_start_date_color = $conf->global->AGENDA_EVENT_PAST_COLOR; } else { // current event - $event_color = $conf->global->AGENDA_EVENT_CURRENT_COLOR; $event_more_class = 'event-current'; + $event_start_date_color = $conf->global->AGENDA_EVENT_CURRENT_COLOR; } } + if ($event_start_date_color != '') { + $event_start_date_style .= 'background: #' . $event_start_date_color . ';'; + } - print ''; + print ''; // Ref if (!empty($arrayfields['a.id']['checked'])) { @@ -964,10 +983,15 @@ while ($i < $imaxinloop) { // User owner if (!empty($arrayfields['owner']['checked'])) { - print ''; // With edge and chrome the td overflow is not supported correctly when content is not full text. - if ($obj->fk_user_action > 0) { - $userstatic->fetch($obj->fk_user_action); - print $userstatic->getNomUrl(-1); + print ''; // With edge and chrome the td overflow is not supported correctly when content is not full text. + if ($obj->fk_user_action > 0 && !isset($cache_user_list[$obj->fk_user_action])) { + $res = $userstatic->fetch($obj->fk_user_action); + if ($res > 0) { + $cache_user_list[$obj->fk_user_action] = $userstatic; + } + } + if (isset($cache_user_list[$obj->fk_user_action])) { + print $cache_user_list[$obj->fk_user_action]->getNomUrl(-1); } else { print ' '; } @@ -1015,7 +1039,7 @@ while ($i < $imaxinloop) { // Start date if (!empty($arrayfields['a.datep']['checked'])) { - print ''; + print ''; if (empty($obj->fulldayevent)) { print dol_print_date($db->jdate($obj->dp), $formatToUse, 'tzuserrel'); } else { From 993812dc70d6e96118326e283054f8014fca76ec Mon Sep 17 00:00:00 2001 From: lvessiller Date: Thu, 21 Jul 2022 11:22:53 +0200 Subject: [PATCH 06/12] FIX stickler-ci --- htdocs/comm/action/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 096771c9ea7..627b1088afe 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -972,7 +972,7 @@ while ($i < $imaxinloop) { $event_start_date_style .= 'background: #' . $event_start_date_color . ';'; } - print ''; + print ''; // Ref if (!empty($arrayfields['a.id']['checked'])) { From 4d59fd2679a6854994a967924e17f9a7cadb5cae Mon Sep 17 00:00:00 2001 From: lvessiller Date: Tue, 26 Jul 2022 16:36:28 +0200 Subject: [PATCH 07/12] FIX reset today event time --- htdocs/comm/action/list.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 627b1088afe..dba1adecf08 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -889,7 +889,6 @@ $i = 0; //$savnbfield = $totalarray['nbfield']; //$totalarray['nbfield'] = 0; $imaxinloop = ($limit ? min($num, $limit) : $num); -$today_start_date_time = dol_now(); $cache_user_list = array(); while ($i < $imaxinloop) { $obj = $db->fetch_object($resql); @@ -945,7 +944,9 @@ while ($i < $imaxinloop) { $event_start_date_style = ''; $event_start_date_time = $actionstatic->datep; if ($obj->fulldayevent) { - $today_start_date_time = dol_mktime(0, 0, 0, date('m', $today_start_date_time), date('d', $today_start_date_time), date('Y', $today_start_date_time)); + $today_start_date_time = dol_mktime(0, 0, 0, date('m', $now), date('d', $now), date('Y', $now)); + } else { + $today_start_date_time = $now; } if ($event_start_date_time > $today_start_date_time) { // future event From 62b70b37d353f3a4dc28a5636ecada25716afaab Mon Sep 17 00:00:00 2001 From: lvessiller Date: Wed, 27 Jul 2022 08:32:46 +0200 Subject: [PATCH 08/12] NEW set today start time at begining --- htdocs/comm/action/list.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index dba1adecf08..674348d6158 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -877,6 +877,7 @@ print "\n"; $now = dol_now(); $delay_warning = $conf->global->MAIN_DELAY_ACTIONS_TODO * 24 * 60 * 60; +$today_start_time = dol_mktime(0, 0, 0, date('m', $now), date('d', $now), date('Y', $now)); require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php'; $caction = new CActionComm($db); @@ -943,8 +944,8 @@ while ($i < $imaxinloop) { $event_more_class = ''; $event_start_date_style = ''; $event_start_date_time = $actionstatic->datep; - if ($obj->fulldayevent) { - $today_start_date_time = dol_mktime(0, 0, 0, date('m', $now), date('d', $now), date('Y', $now)); + if ($obj->fulldayevent == 1) { + $today_start_date_time = $today_start_time; } else { $today_start_date_time = $now; } From c268cf379c100c382fe90710ae2ca950edcbacfa Mon Sep 17 00:00:00 2001 From: lvessiller Date: Fri, 30 Sep 2022 14:00:06 +0200 Subject: [PATCH 09/12] FIX full day event compare start date in future --- htdocs/comm/action/list.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 674348d6158..d5fb64ec471 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -944,16 +944,17 @@ while ($i < $imaxinloop) { $event_more_class = ''; $event_start_date_style = ''; $event_start_date_time = $actionstatic->datep; - if ($obj->fulldayevent == 1) { - $today_start_date_time = $today_start_time; - } else { - $today_start_date_time = $now; - } - if ($event_start_date_time > $today_start_date_time) { + if ($event_start_date_time > $now) { // future event $event_more_class = 'event-future'; $event_start_date_color = $conf->global->AGENDA_EVENT_FUTURE_COLOR; } else { + if ($obj->fulldayevent == 1) { + $today_start_date_time = $today_start_time; + } else { + $today_start_date_time = $now; + } + // check event end date $event_end_date_time = $db->jdate($obj->dp2); if ($event_end_date_time != null && $event_end_date_time < $today_start_date_time) { From 069371fc954597341c3f7e889f8919c507e73174 Mon Sep 17 00:00:00 2001 From: lvessiller Date: Fri, 30 Sep 2022 14:12:03 +0200 Subject: [PATCH 10/12] FIX reload stickler-ci From f18c84621266c9ff6bee315050318070cafab054 Mon Sep 17 00:00:00 2001 From: lvessiller Date: Mon, 3 Oct 2022 14:33:08 +0200 Subject: [PATCH 11/12] FIX user owner cache in event list --- htdocs/comm/action/list.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index d5fb64ec471..8a811a90f22 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -273,7 +273,6 @@ if (empty($reshook)) { */ $form = new Form($db); -$userstatic = new User($db); $formactions = new FormActions($db); $actionstatic = new ActionComm($db); @@ -927,6 +926,7 @@ while ($i < $imaxinloop) { // cache of user list (owners) if ($obj->fk_user_action > 0 && !isset($cache_user_list[$obj->fk_user_action])) { + $userstatic = new User($db); $res = $userstatic->fetch($obj->fk_user_action); if ($res > 0) { $cache_user_list[$obj->fk_user_action] = $userstatic; @@ -988,6 +988,7 @@ while ($i < $imaxinloop) { if (!empty($arrayfields['owner']['checked'])) { print ''; // With edge and chrome the td overflow is not supported correctly when content is not full text. if ($obj->fk_user_action > 0 && !isset($cache_user_list[$obj->fk_user_action])) { + $userstatic = new User($db); $res = $userstatic->fetch($obj->fk_user_action); if ($res > 0) { $cache_user_list[$obj->fk_user_action] = $userstatic; From 3a861af01e12d1d2b7d899501b755079dd147087 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Fri, 25 Nov 2022 17:19:34 +0100 Subject: [PATCH 12/12] FIX reload travis