From f810fffc01a7b5a4581ec3cd84f3a5574a717c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 18 Mar 2021 18:50:38 +0100 Subject: [PATCH 1/2] fix php8 wzrning --- htdocs/core/ajax/ajaxdirtree.php | 2 ++ htdocs/ecm/class/ecmdirectory.class.php | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index 432a0e628db..dab5206fc7d 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -288,6 +288,7 @@ if (empty($conf->use_javascript_ajax) || !empty($conf->global->MAIN_ECM_DISABLE_ print ''; $userstatic->id = $val['fk_user_c']; $userstatic->lastname = $val['login_c']; + $userstatic->lastname = $val['statut_c']; $htmltooltip = ''.$langs->trans("ECMSection").': '.$val['label'].'
'; $htmltooltip = ''.$langs->trans("Type").': '.$langs->trans("ECMSectionManual").'
'; $htmltooltip .= ''.$langs->trans("ECMCreationUser").': '.$userstatic->getNomUrl(1, '', false, 1).'
'; @@ -454,6 +455,7 @@ function treeOutputForAbsoluteDir($sqltree, $selecteddir, $fullpathselecteddir, print ''; $userstatic->id = isset($val['fk_user_c']) ? $val['fk_user_c'] : 0; $userstatic->lastname = isset($val['login_c']) ? $val['login_c'] : 0; + $userstatic->statut = isset($val['statut_c']) ? $val['statut_c'] : 0; $htmltooltip = ''.$langs->trans("ECMSection").': '.$val['label'].'
'; $htmltooltip = ''.$langs->trans("Type").': '.$langs->trans("ECMSectionManual").'
'; $htmltooltip .= ''.$langs->trans("ECMCreationUser").': '.$userstatic->getNomUrl(1, '', false, 1).'
'; diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 5222fc0d21a..52897e84b1a 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -646,6 +646,7 @@ class EcmDirectory extends CommonObject $sql .= " c.fk_user_c,"; $sql .= " c.date_c,"; $sql .= " u.login as login_c,"; + $sql .= " u.statut as statut_c,"; $sql .= " ca.rowid as rowid_fille"; $sql .= " FROM ".MAIN_DB_PREFIX."user as u, ".MAIN_DB_PREFIX."ecm_directories as c"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."ecm_directories as ca"; @@ -667,7 +668,8 @@ class EcmDirectory extends CommonObject $this->cats[$obj->rowid]['description'] = $obj->description; $this->cats[$obj->rowid]['cachenbofdoc'] = $obj->cachenbofdoc; $this->cats[$obj->rowid]['date_c'] = $this->db->jdate($obj->date_c); - $this->cats[$obj->rowid]['fk_user_c'] = $obj->fk_user_c; + $this->cats[$obj->rowid]['fk_user_c'] = (int) $obj->fk_user_c; + $this->cats[$obj->rowid]['statut_c'] = (int) $obj->statut_c; $this->cats[$obj->rowid]['login_c'] = $obj->login_c; if (!empty($obj->rowid_fille)) { From 3380f740e541da9dbaa618401753d4569bce924c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 18 Mar 2021 18:56:28 +0100 Subject: [PATCH 2/2] need to clean glasses --- htdocs/core/ajax/ajaxdirtree.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index dab5206fc7d..1977cfac6e4 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -288,7 +288,7 @@ if (empty($conf->use_javascript_ajax) || !empty($conf->global->MAIN_ECM_DISABLE_ print ''; $userstatic->id = $val['fk_user_c']; $userstatic->lastname = $val['login_c']; - $userstatic->lastname = $val['statut_c']; + $userstatic->statut = $val['statut_c']; $htmltooltip = ''.$langs->trans("ECMSection").': '.$val['label'].'
'; $htmltooltip = ''.$langs->trans("Type").': '.$langs->trans("ECMSectionManual").'
'; $htmltooltip .= ''.$langs->trans("ECMCreationUser").': '.$userstatic->getNomUrl(1, '', false, 1).'
';