From 769027970b1093b6031264c25bdcd8748e32ec96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Lukas?= Date: Sat, 30 Nov 2024 17:18:18 +0100 Subject: [PATCH 1/5] Fix #32155 (#32156) Error forging a SQL request on page eventorganization/conferenceorboothattendee_list.php Co-authored-by: Laurent Destailleur --- .../eventorganization/class/conferenceorboothattendee.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php index 6e3a3d99bd0..29079ce513d 100644 --- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php +++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php @@ -203,7 +203,7 @@ class ConferenceOrBoothAttendee extends CommonObject if (isset($conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE) && getDolGlobalString('EVENTORGANIZATION_FILTERATTENDEES_TYPE') !== '' && getDolGlobalString('EVENTORGANIZATION_FILTERATTENDEES_TYPE') !== '-1') { - $this->fields['fk_soc']['type'] .= ' AND client = '.((int) getDolGlobalInt('EVENTORGANIZATION_FILTERATTENDEES_TYPE', 0)); + $this->fields['fk_soc']['type'] .= ' AND (client:=:'.((int) getDolGlobalInt('EVENTORGANIZATION_FILTERATTENDEES_TYPE', 0) . ')'); } // Example to show how to set values of fields definition dynamically From 5565b153b2c202ddeef4f762854213d899c3ecef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Lukas?= Date: Sun, 1 Dec 2024 23:15:58 +0100 Subject: [PATCH 2/5] Fix #32176 (#32177) --- htdocs/eventorganization/conferenceorboothattendee_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/eventorganization/conferenceorboothattendee_list.php b/htdocs/eventorganization/conferenceorboothattendee_list.php index afa3205f81a..fb6b219df07 100644 --- a/htdocs/eventorganization/conferenceorboothattendee_list.php +++ b/htdocs/eventorganization/conferenceorboothattendee_list.php @@ -603,7 +603,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) { // Show message $message = 'global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...'); + $message .= '&exportkey='.(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY') ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...'); $message .= "&project=".$projectstatic->id.'&module='.urlencode('conforbooth@eventorganization').'&status='.ConferenceOrBooth::STATUS_CONFIRMED.'&output=file">'.$langs->trans('DownloadICSLink').img_picto('', 'download', 'class="paddingleft"').''; print $message; print ""; From 13fdf790d6eb368b5db74ce764d232d93eb3735f Mon Sep 17 00:00:00 2001 From: Gregor Ljubic <50360097+ITResitve@users.noreply.github.com> Date: Sun, 1 Dec 2024 23:17:00 +0100 Subject: [PATCH 3/5] Update list.php (#32164) Co-authored-by: Laurent Destailleur --- htdocs/commande/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index c1960a0c5e9..3db787bbcc2 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -1050,8 +1050,8 @@ if ($search_fk_input_reason > 0) { if ($search_user > 0) { $sql .= " AND EXISTS ("; $sql .= " SELECT ec.fk_c_type_contact, ec.element_id, ec.fk_socpeople"; - $sql .= " FROM llx_element_contact as ec"; - $sql .= " INNER JOIN llx_c_type_contact as tc"; + $sql .= " FROM ".MAIN_DB_PREFIX."element_contact as ec"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."c_type_contact as tc"; $sql .= " ON ec.fk_c_type_contact = tc.rowid AND tc.element='commande' AND tc.source='internal'"; $sql .= " WHERE ec.element_id = c.rowid AND ec.fk_socpeople = ".((int) $search_user).")"; } From 2ad3001ccb871430c752dc1f4b721f0fd03dc699 Mon Sep 17 00:00:00 2001 From: Gregor Ljubic <50360097+ITResitve@users.noreply.github.com> Date: Sun, 1 Dec 2024 23:17:37 +0100 Subject: [PATCH 4/5] Update list.php (#32165) * Update list.php * Update list.php --------- Co-authored-by: Laurent Destailleur --- htdocs/comm/propal/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 1cd7f22552e..9ad46ac19d6 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -735,8 +735,8 @@ if ($search_note_public) { if ($search_user > 0) { $sql .= " AND EXISTS ("; $sql .= " SELECT ec.fk_c_type_contact, ec.element_id, ec.fk_socpeople"; - $sql .= " FROM llx_element_contact as ec"; - $sql .= " INNER JOIN llx_c_type_contact as tc"; + $sql .= " FROM ".MAIN_DB_PREFIX."element_contact as ec"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."c_type_contact as tc"; $sql .= " ON ec.fk_c_type_contact = tc.rowid AND tc.element='propal' AND tc.source='internal'"; $sql .= " WHERE ec.element_id = p.rowid AND ec.fk_socpeople = ".((int) $search_user).")"; } From ea52f679c7da00fcfab0c0e091d60794cd219b0a Mon Sep 17 00:00:00 2001 From: Gregor Ljubic <50360097+ITResitve@users.noreply.github.com> Date: Mon, 2 Dec 2024 00:49:13 +0100 Subject: [PATCH 5/5] Fix #32147 (#32159) Co-authored-by: Laurent Destailleur --- htdocs/compta/facture/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 4eed51ebbbf..29225c9e178 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -875,8 +875,8 @@ if (!empty($search_fac_rec_source_title)) { if ($search_user > 0) { $sql .= " AND EXISTS ("; $sql .= " SELECT ec.fk_c_type_contact, ec.element_id, ec.fk_socpeople"; - $sql .= " FROM llx_element_contact as ec"; - $sql .= " INNER JOIN llx_c_type_contact as tc"; + $sql .= " FROM ".MAIN_DB_PREFIX."element_contact as ec"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."c_type_contact as tc"; $sql .= " ON ec.fk_c_type_contact = tc.rowid AND tc.element='facture' AND tc.source='internal'"; $sql .= " WHERE ec.element_id = f.rowid AND ec.fk_socpeople = ".((int) $search_user).")"; }