From 3a13924685a454e1c7a571047ce9fea405710f86 Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Wed, 5 Apr 2023 12:43:52 +0200 Subject: [PATCH 1/4] FIX - Operator to search category Knowledge --- htdocs/knowledgemanagement/knowledgerecord_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/knowledgemanagement/knowledgerecord_list.php b/htdocs/knowledgemanagement/knowledgerecord_list.php index cafb5776cf7..c4b6eb7eaa6 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_list.php +++ b/htdocs/knowledgemanagement/knowledgerecord_list.php @@ -293,7 +293,7 @@ if (!empty($searchCategoryKnowledgemanagementList)) { if (intval($searchCategoryKnowledgemanagement) == -2) { $searchCategoryKnowledgemanagementSqlList[] = "NOT EXISTS (SELECT ck.fk_knowledgemanagement FROM ".MAIN_DB_PREFIX."categorie_knowledgemanagement as ck WHERE t.rowid = ck.fk_knowledgemanagement)"; } elseif (intval($searchCategoryKnowledgemanagement) > 0) { - if ($searchCategoryKnowledgemanagementOperator == 0) { + if (empty($searchCategoryKnowledgemanagementOperator)) { $searchCategoryKnowledgemanagementSqlList[] = " EXISTS (SELECT ck.fk_knowledgemanagement FROM ".MAIN_DB_PREFIX."categorie_knowledgemanagement as ck WHERE t.rowid = ck.fk_knowledgemanagement AND ck.fk_categorie = ".((int) $searchCategoryKnowledgemanagement).")"; } else { $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryKnowledgemanagement); From 3d9aa470783c5bf0060004f4b89e2171d2310b3c Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Wed, 5 Apr 2023 12:47:14 +0200 Subject: [PATCH 2/4] Copyright --- htdocs/knowledgemanagement/knowledgerecord_list.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/knowledgemanagement/knowledgerecord_list.php b/htdocs/knowledgemanagement/knowledgerecord_list.php index c4b6eb7eaa6..706f103a13d 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_list.php +++ b/htdocs/knowledgemanagement/knowledgerecord_list.php @@ -1,6 +1,7 @@ - * Copyright (C) 2021 Frédéric France +/* Copyright (C) 2007-2017 Laurent Destailleur + * Copyright (C) 2021 Frédéric France + * Copyright (C) 2023 Anthony Berton * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by From 595abd50291ce6408a47ef335cf46693d0747aae Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 6 Apr 2023 14:57:49 +0200 Subject: [PATCH 3/4] fix : Warning: Undefined array key facture in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/compta/facture/card.php on line 3904 --- htdocs/compta/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 8f65df86da7..be552526e1f 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -3901,7 +3901,7 @@ if ($action == 'create') { print $objectsrc->getNomUrl(1); // We check if Origin document (id and type is known) has already at least one invoice attached to it $objectsrc->fetchObjectLinked($originid, $origin, '', 'facture'); - if (is_array($objectsrc->linkedObjects['facture']) && count($objectsrc->linkedObjects['facture']) >= 1) { + if (isset($objectsrc->linkedObjects['facture']) && is_array($objectsrc->linkedObjects['facture']) && count($objectsrc->linkedObjects['facture']) >= 1) { setEventMessages('WarningBillExist', null, 'warnings'); echo ' - '.$langs->trans('LatestRelatedBill').' '.end($objectsrc->linkedObjects['facture'])->getNomUrl(1); } From 399eb9d826b38308235b932e30209c20de25f7a1 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Thu, 6 Apr 2023 15:30:47 +0200 Subject: [PATCH 4/4] Update changelog warning for developer. --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 07fa52ed00f..cf79e783b35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -261,6 +261,7 @@ Following changes may create regressions for some external modules, but were nec * You must use "$objectoffield" to manipulate the current object inside the formulare of computed custom extrafields instead of $obj/$object. * Making a global search is sending the parameter using always the name search_all (instead of sometimes sall and search_all) * The property $url_last_version must be public if defined into module descriptor files; +* Filters in class field definitions must be a Dolibarr filter syntax string. ***** ChangeLog for 16.0.5 compared to 16.0.4 *****