From edd4565921d0da4f177244b15725e3464cea6874 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 27 Oct 2025 12:09:49 +0100 Subject: [PATCH 01/27] FIX wrong check of hook return --- htdocs/takepos/index.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index c18da67daca..373948c64fa 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -1358,13 +1358,13 @@ if ($reshook == 0) { //add buttons $menus[$r++] = $butmenu; } } - } elseif ($reshook == 1) { - $r = 0; //replace buttons - if (is_array($hookmanager->resArray) ) { - foreach ($hookmanager->resArray as $resArray) { - foreach ($resArray as $butmenu) { - $menus[$r++] = $butmenu; - } + } +} elseif ($reshook == 1) { + $r = 0; //replace buttons + if (is_array($hookmanager->resArray) ) { + foreach ($hookmanager->resArray as $resArray) { + foreach ($resArray as $butmenu) { + $menus[$r++] = $butmenu; } } } From 2555b14f9cde73b3808e09173aecd04a2b43a49c Mon Sep 17 00:00:00 2001 From: tnegre Date: Thu, 3 Apr 2025 12:52:23 +0200 Subject: [PATCH 02/27] Fix listincsv on tab societe/price.php --- htdocs/societe/price.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index 6ecf351c1ad..679052a3bc3 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -556,7 +556,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print ''; print '
'; - print ''; + print '
'; print ''; print ''; From dc7932700bfc5b24025fbe4eb76d0e99316e34db Mon Sep 17 00:00:00 2001 From: atm-GregM <85485123+atm-GregM@users.noreply.github.com> Date: Tue, 4 Nov 2025 12:25:57 +0100 Subject: [PATCH 03/27] Fix TICKET_ENABLE_PUBLIC_INTERFACE (#36073) --- .../triggers/interface_50_modTicket_TicketEmail.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php index 55e2bf42c8b..95600161561 100644 --- a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php +++ b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php @@ -379,9 +379,11 @@ class InterfaceTicketEmail extends DolibarrTriggers $message = dol_nl2br($message); } $message_customer .= '

'.$langs->trans('Message').' :

'.$message.'


'; - $url_public_ticket = ($conf->global->TICKET_URL_PUBLIC_INTERFACE ? $conf->global->TICKET_URL_PUBLIC_INTERFACE.'/view.php' : dol_buildpath('/public/ticket/view.php', 2)).'?track_id='.$object->track_id; - $message_customer .= '

'.$langs->trans($see_ticket).' : '.$url_public_ticket.'

'; - $message_customer .= '

'.$langs->trans('TicketEmailPleaseDoNotReplyToThisEmail').'

'; + if (getDolGlobalInt('TICKET_ENABLE_PUBLIC_INTERFACE')){ + $url_public_ticket = ($conf->global->TICKET_URL_PUBLIC_INTERFACE ? $conf->global->TICKET_URL_PUBLIC_INTERFACE.'/view.php' : dol_buildpath('/public/ticket/view.php', 2)).'?track_id='.$object->track_id; + $message_customer .= '

'.$langs->trans($see_ticket).' : '.$url_public_ticket.'

'; + $message_customer .= '

'.$langs->trans('TicketEmailPleaseDoNotReplyToThisEmail').'

'; + } $from = (empty($conf->global->MAIN_INFO_SOCIETE_NOM) ? '' : $conf->global->MAIN_INFO_SOCIETE_NOM.' ').'<'.$conf->global->TICKET_NOTIFICATION_EMAIL_FROM.'>'; From a16f3bdf31409da9f00a9ad4b68531221ff57476 Mon Sep 17 00:00:00 2001 From: Florian Mortgat <50440633+atm-florianm@users.noreply.github.com> Date: Tue, 4 Nov 2025 13:06:58 +0100 Subject: [PATCH 04/27] FIX 16.0: extrafield of type link to category causes SQL error in selectForFormsList() (#36074) * FIX 16.0 (up to 19.0): extrafield of type link to category causes SQL error in selectForFormsList * Apply suggestion from @atm-florianm --- htdocs/core/class/html.form.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 59ad9db8377..beb884f39bc 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -7821,6 +7821,8 @@ class Form if ($tmpfieldstoshow) { $fieldstoshow = $tmpfieldstoshow; } + } else if ($objecttmp->element === 'category') { + $fieldstoshow = 't.label'; } else { // For backward compatibility $objecttmp->fields['ref'] = array('type'=>'varchar(30)', 'label'=>'Ref', 'showoncombobox'=>1); From 1c7cb37e74a85ebbf4f7be1097468e373a32781a Mon Sep 17 00:00:00 2001 From: noec764 <58433943+noec764@users.noreply.github.com> Date: Tue, 4 Nov 2025 18:43:20 +0100 Subject: [PATCH 05/27] FIX: Add missing left join to filter by extrafields (#36092) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: NoƩ --- htdocs/webportal/class/html.formwebportal.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/webportal/class/html.formwebportal.class.php b/htdocs/webportal/class/html.formwebportal.class.php index 59cc07a8f40..6a5197d7bd5 100644 --- a/htdocs/webportal/class/html.formwebportal.class.php +++ b/htdocs/webportal/class/html.formwebportal.class.php @@ -387,7 +387,6 @@ class FormWebPortal extends Form $classpath = $InfoFieldList[1]; $filter = empty($InfoFieldList[3]) ? '' : $InfoFieldList[3]; $sortfield = empty($InfoFieldList[4]) ? '' : $InfoFieldList[4]; - if (!empty($classpath)) { dol_include_once($classpath); @@ -492,6 +491,10 @@ class FormWebPortal extends Form } } + if (!empty($objecttmp->isextrafieldmanaged)) { + $sql .= " LEFT JOIN " . $this->db->prefix() . $this->db->sanitize($objecttmp->table_element) . "_extrafields as e ON t.rowid = e.fk_object"; + } + // Add where from hooks $parameters = array( 'object' => $objecttmp, From 689b992afbf5f608c28a6abf784cd81c91a53dd4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 5 Nov 2025 22:40:50 +0100 Subject: [PATCH 06/27] Split tasks --- .github/workflows/pr-18.yaml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-18.yaml b/.github/workflows/pr-18.yaml index f13993e8a20..393e35013c0 100644 --- a/.github/workflows/pr-18.yaml +++ b/.github/workflows/pr-18.yaml @@ -39,13 +39,26 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Assign reviewer + - name: Assign Tag + env: + GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} + url: ${{ github.event.pull_request.html_url }} + run: | + echo "env.url=${{env.url}}" + gh pr edit "${{env.url}}" --add-label "Issue for v18 maintenance Team" + + - name: Assign reviewer 1 + env: + GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} + url: ${{ github.event.pull_request.html_url }} + run: | + echo "env.url=${{env.url}}" + gh pr edit "${{env.url}}" --add-reviewer lvessiller-opendsi + + - name: Assign reviewer 2 env: GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} url: ${{ github.event.pull_request.html_url }} run: | echo "env.url=${{env.url}}" gh pr edit "${{env.url}}" --add-reviewer rycks - gh pr edit "${{env.url}}" --add-reviewer lvessiller-opendsi - #gh pr edit "${{env.url}}" --add-reviewer eldy - gh pr edit "${{env.url}}" --add-label "Issue for v18 maintenance Team" From 027b6f060d8acd1f2b36c6b65d93f3ab0000c884 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Thu, 6 Nov 2025 02:30:59 +0100 Subject: [PATCH 07/27] Fix CI --- .github/workflows/ci-on-pull_request.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci-on-pull_request.yml b/.github/workflows/ci-on-pull_request.yml index 7b3fff88c7d..201e91cb8c6 100644 --- a/.github/workflows/ci-on-pull_request.yml +++ b/.github/workflows/ci-on-pull_request.yml @@ -16,7 +16,7 @@ jobs: phpstan: uses: ./.github/workflows/phpstan.yml secrets: inherit - needs: [pre-commit, phan] + needs: [pre-commit] with: gh_event: ${{ github.event_name }} #windows-ci: @@ -25,16 +25,17 @@ jobs: # uses: ./.github/workflows/windows-ci.yml # with: # gh_event: ${{ github.event_name }} - gh-travis: # Runs travis script on github runner (not on travis) - if: false - # needs: [pre-commit, phan] - # needs: [windows-ci] - secrets: inherit - uses: ./.github/workflows/gh-travis.yml - with: - gh_event: ${{ github.event_name }} + #gh-travis: # Runs travis script on github runner (not on travis) + # if: false + # # needs: [pre-commit, phan] + # # needs: [windows-ci] + # secrets: inherit + # needs: [pre-commit, phan, phpstan] + # uses: ./.github/workflows/gh-travis.yml + # with: + # gh_event: ${{ github.event_name }} # Note (not tested, from https://github.com/orgs/community/discussions/38361) -# To cancel jobs if one failes, the following action may help +# To cancel jobs if one fails, the following action may help # - if: "failure()" # uses: "andymckay/cancel-action@0.3" From b0e8b9650be5b39725eef96d1457a5d32a96dac4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Nov 2025 04:01:46 +0100 Subject: [PATCH 08/27] Fix CI --- htdocs/langs/en_US/mails.lang | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang index 31ae06819e2..fc3680e806d 100644 --- a/htdocs/langs/en_US/mails.lang +++ b/htdocs/langs/en_US/mails.lang @@ -196,3 +196,7 @@ ModelTemplate=Email template YouCanChooseAModelForYouMailContent= You can choose one of template models or generate one with AI TitleOfMailHolder=Title of the e-mail goes here ContentOfMailHolder=Content of email goes here... +LastNews=Latest News +ListProducts= List of products +PasswordReset=Password reset +WarningDNSServerNotAvailable=Warning DNS server not available From 583cc1f15f746a3b8006fd398ba12c5d8f2dd2ff Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Nov 2025 17:38:36 +0100 Subject: [PATCH 09/27] Fix warning --- htdocs/categories/class/categorie.class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 5dd92761cdb..1e9f291b1b9 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -955,11 +955,12 @@ class Categorie extends CommonObject $objs[] = $rec['fk_object']; } else { $classnameforobj = $this->MAP_OBJ_CLASS[$type]; - - $obj = new $classnameforobj($this->db); - $obj->fetch($rec['fk_object']); - if ($obj->id > 0) { // Failing fetch may happen for example when a category supplier was set and third party was moved as customer only. The object supplier can't be loaded. - $objs[] = $obj; + if (!empty($classnameforobj) && class_exists($classnameforobj)) { + $obj = new $classnameforobj($this->db); + $obj->fetch($rec['fk_object']); + if ($obj->id > 0) { // Failing fetch may happen for example when a category supplier was set and third party was moved as customer only. The object supplier can't be loaded. + $objs[] = $obj; + } } } } From 25b1004c7bd1795ed9e398a67fb45ed3b40b4dd1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Nov 2025 17:45:25 +0100 Subject: [PATCH 10/27] Fix getObjectsInCateg --- htdocs/categories/class/categorie.class.php | 82 ++++++++++----------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 1e9f291b1b9..141401b43b2 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -915,60 +915,60 @@ class Categorie extends CommonObject $objs = array(); $classnameforobj = $this->MAP_OBJ_CLASS[$type]; - $obj = new $classnameforobj($this->db); + if (!empty($classnameforobj) && class_exists($classnameforobj)) { + $obj = new $classnameforobj($this->db); - $sql = "SELECT c.fk_".(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type])." as fk_object"; - $sql .= " FROM ".MAIN_DB_PREFIX."categorie_".(empty($this->MAP_CAT_TABLE[$type]) ? $type : $this->MAP_CAT_TABLE[$type])." as c"; - $sql .= ", ".MAIN_DB_PREFIX.(empty($this->MAP_OBJ_TABLE[$type]) ? $type : $this->MAP_OBJ_TABLE[$type])." as o"; - $sql .= " WHERE o.entity IN (".getEntity($obj->element).")"; - $sql .= " AND c.fk_categorie = ".((int) $this->id); - // Compatibility with actioncomm table which has id instead of rowid - if ((array_key_exists($type, $this->MAP_OBJ_TABLE) && $this->MAP_OBJ_TABLE[$type] == "actioncomm") || $type == "actioncomm") { - $sql .= " AND c.fk_".(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type])." = o.id"; - } else { - $sql .= " AND c.fk_".(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type])." = o.rowid"; - } - // Protection for external users - if (($type == 'customer' || $type == 'supplier') && $user->socid > 0) { - $sql .= " AND o.rowid = ".((int) $user->socid); - } + $sql = "SELECT c.fk_".(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type])." as fk_object"; + $sql .= " FROM ".MAIN_DB_PREFIX."categorie_".(empty($this->MAP_CAT_TABLE[$type]) ? $type : $this->MAP_CAT_TABLE[$type])." as c"; + $sql .= ", ".MAIN_DB_PREFIX.(empty($this->MAP_OBJ_TABLE[$type]) ? $type : $this->MAP_OBJ_TABLE[$type])." as o"; + $sql .= " WHERE o.entity IN (".getEntity($obj->element).")"; + $sql .= " AND c.fk_categorie = ".((int) $this->id); + // Compatibility with actioncomm table which has id instead of rowid + if ((array_key_exists($type, $this->MAP_OBJ_TABLE) && $this->MAP_OBJ_TABLE[$type] == "actioncomm") || $type == "actioncomm") { + $sql .= " AND c.fk_".(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type])." = o.id"; + } else { + $sql .= " AND c.fk_".(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type])." = o.rowid"; + } + // Protection for external users + if (($type == 'customer' || $type == 'supplier') && $user->socid > 0) { + $sql .= " AND o.rowid = ".((int) $user->socid); + } - $errormessage = ''; - $sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage); - if ($errormessage) { - $this->errors[] = $errormessage; - dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR); - return -1; - } + $errormessage = ''; + $sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage); + if ($errormessage) { + $this->errors[] = $errormessage; + dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR); + return -1; + } - $sql .= $this->db->order($sortfield, $sortorder); - if ($limit > 0 || $offset > 0) { - $sql .= $this->db->plimit($limit + 1, $offset); - } + $sql .= $this->db->order($sortfield, $sortorder); + if ($limit > 0 || $offset > 0) { + $sql .= $this->db->plimit($limit + 1, $offset); + } - dol_syslog(get_class($this)."::getObjectsInCateg", LOG_DEBUG); + dol_syslog(get_class($this)."::getObjectsInCateg", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) { - while ($rec = $this->db->fetch_array($resql)) { - if ($onlyids) { - $objs[] = $rec['fk_object']; - } else { - $classnameforobj = $this->MAP_OBJ_CLASS[$type]; - if (!empty($classnameforobj) && class_exists($classnameforobj)) { - $obj = new $classnameforobj($this->db); + $resql = $this->db->query($sql); + if ($resql) { + while ($rec = $this->db->fetch_array($resql)) { + if ($onlyids) { + $objs[] = $rec['fk_object']; + } else { + $obj->id = 0; $obj->fetch($rec['fk_object']); if ($obj->id > 0) { // Failing fetch may happen for example when a category supplier was set and third party was moved as customer only. The object supplier can't be loaded. $objs[] = $obj; } } } + } else { + $this->error = $this->db->error().' sql='.$sql; + return -1; } - return $objs; - } else { - $this->error = $this->db->error().' sql='.$sql; - return -1; } + + return $objs; } /** From 5fa475a07401bb97e11746615622e636e858b573 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 7 Nov 2025 18:43:26 +0100 Subject: [PATCH 11/27] fix directory was always overwritten (#36148) --- htdocs/eventorganization/conferenceorbooth_document.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/eventorganization/conferenceorbooth_document.php b/htdocs/eventorganization/conferenceorbooth_document.php index 742585ffb16..737b64606b2 100644 --- a/htdocs/eventorganization/conferenceorbooth_document.php +++ b/htdocs/eventorganization/conferenceorbooth_document.php @@ -84,6 +84,7 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. +$upload_dir = $conf->eventorganization->multidir_output[isset($object->entity) ? $object->entity : 1]; if ($id > 0 || !empty($ref)) { $upload_dir = $conf->eventorganization->multidir_output[$object->entity ? $object->entity : $conf->entity]."/conferenceorbooth/".get_exdir(0, 0, 0, 1, $object); } @@ -93,7 +94,6 @@ $permissiontoadd = $user->rights->eventorganization->write; // Used by the inclu $permissiontodelete = $user->rights->eventorganization->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); $permissionnote = $user->rights->eventorganization->write; // Used by the include of actions_setnotes.inc.php $permissiondellink = $user->rights->eventorganization->write; // Used by the include of actions_dellink.inc.php -$upload_dir = $conf->eventorganization->multidir_output[isset($object->entity) ? $object->entity : 1]; // Security check if ($user->socid > 0) { From 093bbcdec2f805363ccea32dfacf174bc1253d34 Mon Sep 17 00:00:00 2001 From: MDW Date: Fri, 7 Nov 2025 18:48:05 +0100 Subject: [PATCH 12/27] Qual: Fix false phan positive in export.php (#36147) * Qual: Type cast for field parameter # Qual: Type cast for field parameter Cast to string to ensure the value is not interpreted as a potential array. * Qual: Backport typing hint to fix typing in 20.0 --- htdocs/exports/class/export.class.php | 3 +++ htdocs/exports/export.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index ca85fad2e21..c5cc14d7fae 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -70,6 +70,9 @@ class Export public $array_export_TypeFields = array(); // Tableau des listes de champ+Type de filtre public $array_export_FilterValue = array(); // Tableau des listes de champ+Valeur a filtrer public $array_export_entities = array(); // Tableau des listes de champ+alias a exporter + /** + * @var array> + */ public $array_export_dependencies = array(); // array of list of entities that must take care of the DISTINCT if a field is added into export public $array_export_special = array(); // array of special operations to do on field public $array_export_examplevalues = array(); // array with examples for fields diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index 9262f6d5457..a88898faaa8 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -146,7 +146,7 @@ $step = GETPOSTINT("step") ? GETPOSTINT("step") : 1; $export_name = GETPOST("export_name", "alphanohtml"); $hexa = GETPOST("hexa", "alpha"); $exportmodelid = GETPOSTINT("exportmodelid"); -$field = GETPOST("field", "alpha"); +$field = (string) GETPOST("field", "alpha"); $objexport = new Export($db); $objexport->load_arrays($user, $datatoexport); From 8d63609c145357beb0b26b9dfcb0f8d8447b1890 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 8 Nov 2025 14:01:56 +0100 Subject: [PATCH 13/27] FIX missing check if partership is enabled (#36169) --- htdocs/public/webportal/webportal.main.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/webportal/webportal.main.inc.php b/htdocs/public/webportal/webportal.main.inc.php index 1b61cbafa33..aa731189ed8 100644 --- a/htdocs/public/webportal/webportal.main.inc.php +++ b/htdocs/public/webportal/webportal.main.inc.php @@ -258,7 +258,7 @@ if (!defined('WEBPORTAL_NOLOGIN') && !empty($context->controllerInstance->access $context->setEventMessage($error_msg, 'errors'); } - if (!$error && $logged_member->id > 0) { + if (isModEnabled('partnership') && !$error && $logged_member->id > 0) { // get partnership $logged_partnership = new WebPortalPartnership($db); // @phan-suppress-next-line PhanPluginSuspiciousParamPosition From d5a9fe97a9edf231aa1c33d9f07e0dde8e015c3e Mon Sep 17 00:00:00 2001 From: HENRY Florian Date: Sun, 9 Nov 2025 01:24:02 +0100 Subject: [PATCH 14/27] FIX: when display in view mode HTML extrafeilds content doubled (#36127) * FIX: when display in view mode HTML extrafeilds content doubled * review * Update extrafields_view.tpl.php * Update extrafields_view.tpl.php * Update extrafields_view.tpl.php --------- Co-authored-by: Laurent Destailleur --- htdocs/core/tpl/extrafields_view.tpl.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index 75a4239b98c..2f71f5981a9 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -252,7 +252,7 @@ if (empty($reshook) && !empty($object->table_element) && isset($extrafields->att $value = GETPOSTISSET("options_".$tmpkeyextra) ? dol_mktime(GETPOSTINT("options_".$tmpkeyextra."hour"), GETPOSTINT("options_".$tmpkeyextra."min"), GETPOSTINT("options_".$tmpkeyextra."sec"), GETPOSTINT("options_".$tmpkeyextra."month"), GETPOSTINT("options_".$tmpkeyextra."day"), GETPOSTINT("options_".$tmpkeyextra."year"), 'tzuserrel') : $datenotinstring; } - //TODO Improve element and rights detection + // TODO Improve element and rights detection if ($action == 'edit_extras' && $permok && GETPOST('attribute', 'restricthtml') == $tmpkeyextra) { // Show the extrafield in create or edit mode $fieldid = 'id'; @@ -266,15 +266,15 @@ if (empty($reshook) && !empty($object->table_element) && isset($extrafields->att print ''; print $extrafields->showInputField($tmpkeyextra, $value, '', '', '', 0, $object, $object->table_element); - print ''; + print ''; print ''; } else { // Show the extrafield in view mode - //var_dump($tmpkeyextra.'-'.$value.'-'.$object->table_element); print $extrafields->showOutputField($tmpkeyextra, $value, '', $object->table_element, null, $object); - print ''; // it's needed when to get parent value when extra-field list depend on parent extra-field list + + print ''; // it's needed when to get parent value when extra-field list depend on parent extra-field list } print ''; From a7ec88c2ac0e630fd0924bf70330dfc771db9df1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 9 Nov 2025 02:40:40 +0100 Subject: [PATCH 15/27] Fix update of color when using HTML5 --- htdocs/user/class/user.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index ad5a9ad7a22..09568b5ea47 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -2159,7 +2159,7 @@ class User extends CommonObject $this->accountancy_code_user_general = trim((string) $this->accountancy_code_user_general); $this->accountancy_code = trim((string) $this->accountancy_code); - $this->color = trim((string) $this->color); + $this->color = trim(str_replace('#', '', (string) $this->color)); $this->dateemployment = empty($this->dateemployment) ? '' : $this->dateemployment; $this->dateemploymentend = empty($this->dateemploymentend) ? '' : $this->dateemploymentend; From c9d1179ba8ceb74935a5ee22b53972457ece26cc Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 9 Nov 2025 19:28:16 +0100 Subject: [PATCH 16/27] FIX Import/Export - Do not list imports or exports of Builder module backups of module descriptor files (#36192) * FIX Import/Export - Do not list imports or exports of Builder module backups of module descriptor files * FIX --- htdocs/exports/class/export.class.php | 5 +++++ htdocs/imports/class/import.class.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index 1c5a3eac642..ef0fc009833 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -194,6 +194,11 @@ class Export if (is_resource($handle)) { // Search module files while (($file = readdir($handle)) !== false) { + // Ignore Module Builder backup files (*.php.back) + if (preg_match('/\.back$/i', $file)) { + continue; + } + $reg = array(); if (is_readable($dir.$file) && preg_match("/^(mod.*)\.class\.php$/i", $file, $reg)) { $modulename = $reg[1]; diff --git a/htdocs/imports/class/import.class.php b/htdocs/imports/class/import.class.php index 00923125430..e1cfa9fea0e 100644 --- a/htdocs/imports/class/import.class.php +++ b/htdocs/imports/class/import.class.php @@ -195,6 +195,11 @@ class Import // Search module files while (($file = readdir($handle)) !== false) { + // Ignore Module Builder backup files (*.php.back) + if (preg_match('/\.back$/i', $file)) { + continue; + } + if (!preg_match("/^(mod.*)\.class\.php/i", $file, $reg)) { continue; } From 6de355b7d2fc5b2286cc0b58d4b28139a21f5b4d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 10 Nov 2025 22:43:23 +0100 Subject: [PATCH 17/27] Fix error on triggers not propagated --- htdocs/core/triggers/dolibarrtriggers.class.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/htdocs/core/triggers/dolibarrtriggers.class.php b/htdocs/core/triggers/dolibarrtriggers.class.php index ad8bd1fa159..c028e54b226 100644 --- a/htdocs/core/triggers/dolibarrtriggers.class.php +++ b/htdocs/core/triggers/dolibarrtriggers.class.php @@ -169,10 +169,18 @@ abstract class DolibarrTriggers public function setErrorsFromObject(CommonObject $object) { if (!empty($object->error)) { - $this->errors = array_merge($this->errors, array($object->error)); + if (is_array($this->errors)) { + $this->errors = array_merge($this->errors, array($object->error)); + } else { + $this->errors = array($object->error); + } } if (!empty($object->errors)) { - $this->errors = array_merge($this->errors, $object->errors); + if (is_array($this->errors)) { + $this->errors = array_merge($this->errors, $object->errors); + } else { + $this->errors = $object->errors; + } } } From 0da7ae7bed40094da353abc2907e609435d77691 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Tue, 11 Nov 2025 17:41:44 +0100 Subject: [PATCH 18/27] Fix missing multiprices arraykey (#36204) --- htdocs/product/class/product.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 76db76bb441..4c2bbaf7d39 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -3273,7 +3273,8 @@ class Product extends CommonObject if (!$resql) { $this->error = $this->db->lasterror; return -1; - } elseif ($result = $this->db->fetch_array($resql)) { + } else { + $result = $this->db->fetch_array($resql); $this->multiprices[$i] = (!empty($result["price"]) ? $result["price"] : 0); $this->multiprices_ttc[$i] = (!empty($result["price_ttc"]) ? $result["price_ttc"] : 0); $this->multiprices_min[$i] = (!empty($result["price_min"]) ? $result["price_min"] : 0); From 079a55153f6ec02f13fff74ae36502d556efad01 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Tue, 11 Nov 2025 17:42:03 +0100 Subject: [PATCH 19/27] Fix php warning in order list (#36202) * Fix order list php warning * missing td --- htdocs/commande/list.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 6dcdbcf1c07..e02711b3584 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -2574,9 +2574,12 @@ while ($i < $imaxinloop) { if (!is_array($typenArray) || count($typenArray) == 0) { $typenArray = $formcompany->typent_array(1); } - print ''; if (!$i) { From b35994bf93211ddeb190dd3c250e96feff585660 Mon Sep 17 00:00:00 2001 From: splohmer <113967431+splohmer@users.noreply.github.com> Date: Tue, 11 Nov 2025 17:53:40 +0100 Subject: [PATCH 20/27] FIX late customer orders are not shown on start page (#36200) due to an mismatch of the used variable in hasDelay (status) and the setted variable (statut) the late orders where never shown in the start page as the count was always wrongly zero. --- htdocs/commande/class/commande.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 721f3d14a74..5384ef377d5 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3698,8 +3698,7 @@ class Commande extends CommonOrder $response->nbtodo++; $response->total += $obj->total_ht; - $generic_commande->statut = $obj->fk_statut; - $generic_commande->date_commande = $this->db->jdate($obj->date_commande); + $generic_commande->status = $obj->fk_statut; $generic_commande->date = $this->db->jdate($obj->date_commande); $generic_commande->delivery_date = $this->db->jdate($obj->delivery_date); From 2ea3c1bc21ecc9449ae3f0dd296b19c4dc37c73f Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 12 Nov 2025 09:38:06 +0100 Subject: [PATCH 21/27] FIX conflict between $user->id and $object->id (#36225) * FIX conflict between $user->id and $object->id * FIX better fix * FIX arfff --- htdocs/user/messaging.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/user/messaging.php b/htdocs/user/messaging.php index 61c34936ec4..df8230b1841 100644 --- a/htdocs/user/messaging.php +++ b/htdocs/user/messaging.php @@ -158,7 +158,7 @@ $morehtmlref .= dolButtonToOpenUrlInDialogPopup('publicvirtualcard', $langs->tra dol_banner_tab($object, 'id', $linkback, $user->hasRight('user', 'user', 'lire') || $user->admin, 'rowid', 'ref', $morehtmlref); -$object->info($id); +$object->info($object->id); print '
'; @@ -180,10 +180,10 @@ $out = ''; $permok = $user->hasRight('agenda', 'myactions', 'create'); if ((!empty($objUser->id) || !empty($objcon->id)) && $permok) { if (is_object($objUser) && get_class($objUser) == 'User') { - $out .= '&originid='.$objUser->id.($objUser->id > 0 ? '&userid='.$objUser->id : '').'&backtopage='.urlencode($_SERVER['PHP_SELF'].($objUser->id > 0 ? '?userid='.$objUser->id : '')); + $out .= '&originid='.$objUser->id.($objUser->id > 0 ? '&userid='.$objUser->id : '').'&backtopage='.urlencode($_SERVER['PHP_SELF'].($objUser->id > 0 ? '?userid='.$objUser->id : '')); } - $out .= (!empty($objcon->id) ? '&contactid='.$objcon->id : ''); - $out .= '&datep='.dol_print_date(dol_now(), 'dayhourlog', 'tzuserrel'); + $out .= (!empty($objcon->id) ? '&contactid='.$objcon->id : ''); + $out .= '&datep='.dol_print_date(dol_now(), 'dayhourlog', 'tzuserrel'); } $morehtmlright = ''; @@ -201,7 +201,7 @@ if (isModEnabled('agenda')) { if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allaactions', 'read'))) { print '
'; - $param = '&userid='.urlencode((string) ($id)); + $param = '&userid='.urlencode((string) ($object->id)); if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { $param .= '&contextpage='.urlencode($contextpage); } From da08b2f5c3139d587eebcac26f9b66601be9cc0c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Nov 2025 15:39:37 +0100 Subject: [PATCH 22/27] Update status --- htdocs/commande/class/commande.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 06467ac3855..6f0b56cc5e5 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -835,6 +835,7 @@ class Commande extends CommonOrder if (!$error) { $this->statut = self::STATUS_CLOSED; + $this->status = self::STATUS_CLOSED; $this->db->commit(); return 1; From 3ddf7305bd54e46edd402b5a5a7f804c0fad7657 Mon Sep 17 00:00:00 2001 From: atm-adrien <67913809+atm-adrien@users.noreply.github.com> Date: Wed, 12 Nov 2025 15:39:44 +0100 Subject: [PATCH 23/27] FIX : The order closing date was not filled in during the shipment validation (workflow module). (#36235) --- .../triggers/interface_20_modWorkflow_WorkflowManager.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php index ced28f37606..047adae79cf 100644 --- a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php +++ b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php @@ -467,7 +467,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers $diff_array = array_diff_assoc($qtyordred, $qtyshipped); if (count($diff_array) == 0) { //No diff => mean everything is shipped - $ret = $order->setStatut(Commande::STATUS_CLOSED, $object->origin_id, $object->origin, 'ORDER_CLOSE'); + $ret = $order->cloture($user); if ($ret < 0) { $this->setErrorsFromObject($order); return $ret; From ea289728621b34fa2064f831d63f4822827a4757 Mon Sep 17 00:00:00 2001 From: Ryad ABANI <91743099+RyAbn@users.noreply.github.com> Date: Wed, 12 Nov 2025 15:44:40 +0100 Subject: [PATCH 24/27] FIX: dol_escape_htmltag in extrafields_view (#36136) Co-authored-by: Ryad ABANI --- htdocs/core/tpl/extrafields_view.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index dfe2c7c6f3c..b5cbe7c519a 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -259,7 +259,7 @@ if (empty($reshook) && !empty($object->table_element) && isset($extrafields->att } else { //var_dump($tmpkeyextra.'-'.$value.'-'.$object->table_element); print $extrafields->showOutputField($tmpkeyextra, $value, '', $object->table_element); - print ''; // it's needed when to get parent value when extra-field list depend on parent extra-field list + print ''; // it's needed when to get parent value when extra-field list depend on parent extra-field list } print ''; From e83d3a830b073c6bdb122cc62938d741cb27dd87 Mon Sep 17 00:00:00 2001 From: Benjamin Chanudet Date: Wed, 12 Nov 2025 19:05:50 +0100 Subject: [PATCH 25/27] FIX Select correct approver when making a leave request for someone else (#36118) * select correct approver when creating a leave request for someone else * Clarify comments regarding default approver logic --------- Co-authored-by: Laurent Destailleur --- htdocs/holiday/card.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 6c344e2e718..7bd30263504 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -1161,9 +1161,15 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') { if (empty($include_users)) { print img_warning().' '.$langs->trans("NobodyHasPermissionToValidateHolidays"); } else { - // Defined default approver (the forced approved of user or the supervisor if no forced value defined) - // Note: This use will be set only if the deinfed approvr has permission to approve so is inside include_users + // Defined default approver (the forced approver of edited user or the supervisor of user if no forced value defined) + // Note: This user will be set only if the defined approver has permission to approve so is inside include_users $defaultselectuser = (empty($user->fk_user_holiday_validator) ? $user->fk_user : $user->fk_user_holiday_validator); + if ($fuserid != $user->id) { + $fuser = new User($db); + $fuser->fetch($fuserid); + $defaultselectuser = (empty($fuser->fk_user_holiday_validator) ? $fuser->fk_user : $fuser->fk_user_holiday_validator); + } + if (getDolGlobalString('HOLIDAY_DEFAULT_VALIDATOR')) { $defaultselectuser = getDolGlobalString('HOLIDAY_DEFAULT_VALIDATOR'); // Can force default approver } From aa9d5da57561c8179dd6bf7d6d05c2d87f1f3c6a Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio <68746600+marc-dll@users.noreply.github.com> Date: Wed, 12 Nov 2025 19:08:13 +0100 Subject: [PATCH 26/27] FIX: resize iban column to support encryption (#36237) --- htdocs/install/mysql/migration/20.0.0-21.0.0.sql | 5 ++--- htdocs/install/mysql/tables/llx_bank_account.sql | 2 +- htdocs/install/mysql/tables/llx_user_rib.sql | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql index 7313c65ae64..f95c73cb5d5 100644 --- a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql +++ b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql @@ -94,9 +94,8 @@ ALTER TABLE llx_product DROP FOREIGN KEY fk_product_default_warehouse; DROP TABLE llx_contratdet_log; -ALTER TABLE llx_societe_rib MODIFY COLUMN iban_prefix varchar(80); -ALTER TABLE llx_bank_account MODIFY COLUMN iban_prefix varchar(80); -ALTER TABLE llx_user_rib MODIFY COLUMN iban_prefix varchar(80); +ALTER TABLE llx_bank_account MODIFY COLUMN iban_prefix varchar(100); +ALTER TABLE llx_user_rib MODIFY COLUMN iban_prefix varchar(100); ALTER TABLE llx_bom_bom ADD COLUMN last_main_doc varchar(255) AFTER model_pdf; diff --git a/htdocs/install/mysql/tables/llx_bank_account.sql b/htdocs/install/mysql/tables/llx_bank_account.sql index 059cad3118b..3cefdeebbd8 100644 --- a/htdocs/install/mysql/tables/llx_bank_account.sql +++ b/htdocs/install/mysql/tables/llx_bank_account.sql @@ -39,7 +39,7 @@ create table llx_bank_account cle_rib varchar(5), bic varchar(11), -- 11 according to ISO 9362 bic_intermediate varchar(11), -- 11 according to ISO 9362. Same as bic but for intermediate bank - iban_prefix varchar(80), -- full iban. 34 according to ISO 13616 but we set 80 to allow to store it with encryption information + iban_prefix varchar(100), -- full iban. 34 according to ISO 13616 but we set 100 to allow to store it with encryption information country_iban varchar(2), -- deprecated cle_iban varchar(2), domiciliation varchar(255), diff --git a/htdocs/install/mysql/tables/llx_user_rib.sql b/htdocs/install/mysql/tables/llx_user_rib.sql index 50733bcbc75..ef6e73b9877 100644 --- a/htdocs/install/mysql/tables/llx_user_rib.sql +++ b/htdocs/install/mysql/tables/llx_user_rib.sql @@ -31,7 +31,7 @@ create table llx_user_rib cle_rib varchar(5), -- key of bank account bic varchar(11), -- 11 according to ISO 9362 bic_intermediate varchar(11), -- 11 according to ISO 9362. Same as bic but for intermediate bank - iban_prefix varchar(80), -- full iban. 34 according to ISO 13616 but we set 80 to allow to store it with encryption information + iban_prefix varchar(100), -- full iban. 34 according to ISO 13616 but we set 100 to allow to store it with encryption information domiciliation varchar(255), proprio varchar(60), owner_address varchar(255), From ba0a7fe17a1ce940a11ac448b326df0271ba91fd Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio <68746600+marc-dll@users.noreply.github.com> Date: Wed, 12 Nov 2025 19:09:03 +0100 Subject: [PATCH 27/27] FIX: categories: sql error in link extrafields targettings categories (#36236) --- htdocs/core/class/html.form.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index e28b51ed9ba..09d2f768544 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -9138,7 +9138,11 @@ class Form // Search data $sql = "SELECT t.rowid, " . $fieldstoshow . " FROM " . $this->db->prefix() . $this->db->sanitize($objecttmp->table_element) . " as t"; if (!empty($objecttmp->isextrafieldmanaged)) { - $sql .= " LEFT JOIN " . $this->db->prefix() . $this->db->sanitize($objecttmp->table_element) . "_extrafields as e ON t.rowid = e.fk_object"; + $extrafieldTable = $objecttmp->table_element; + if ($extrafieldTable == 'categorie') { + $extrafieldTable = 'categories'; // For compatibility + } + $sql .= " LEFT JOIN " . $this->db->prefix() . $this->db->sanitize($extrafieldTable) . "_extrafields as e ON t.rowid = e.fk_object"; } if (!empty($objecttmp->parent_element)) { // If parent_element is defined $parent_properties = getElementProperties($objecttmp->parent_element);
'.$langs->trans("Ref").''; if (!empty($obj->typent_code)) { + print ''; print $typenArray[$obj->typent_code]; + } else { + print ''; + print ''; } print '