From 8e2868c2915d7110092226124f123ea738bbc9bd Mon Sep 17 00:00:00 2001 From: MDW Date: Mon, 4 May 2026 17:36:05 +0200 Subject: [PATCH 1/2] Qual: Fix PHPStan (array definition) (#38071) * Qual: Fix PHPStan (array definition) # Qual: Fix PHPStan (array definition) More complete array definition for $TNetNeeds argument * Qual: Update PHPStan baseline --------- Co-authored-by: Laurent Destailleur --- dev/build/phpstan/phpstan-baseline.neon | 350 +----------------------- htdocs/bom/class/bom.class.php | 2 +- 2 files changed, 2 insertions(+), 350 deletions(-) diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index 65f1da5dd2f..a2414d4521c 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -960,12 +960,6 @@ parameters: count: 1 path: ../../../htdocs/bom/class/api_boms.class.php - - - message: '#^Method BOM\:\:getNetNeedsTree\(\) has parameter \$TNetNeeds with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/bom/class/bom.class.php - - message: '#^Call to function is_object\(\) with BOMLine will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -1257,7 +1251,7 @@ parameters: - message: '#^Parameter \#16 \$usergroupid of function print_actions_filter expects array\\|int, string given\.$#' identifier: argument.type - count: 3 + count: 1 path: ../../../htdocs/comm/action/index.php - @@ -1428,12 +1422,6 @@ parameters: count: 2 path: ../../../htdocs/comm/action/peruser.php - - - message: '#^Variable \$labelbytype might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/comm/action/peruser.php - - message: '#^Right side of && is always true\.$#' identifier: booleanAnd.rightAlwaysTrue @@ -1458,12 +1446,6 @@ parameters: count: 6 path: ../../../htdocs/comm/card.php - - - message: '#^Variable \$label might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/comm/contact.php - - message: '#^Right side of && is always false\.$#' identifier: booleanAnd.rightAlwaysFalse @@ -1536,12 +1518,6 @@ parameters: count: 4 path: ../../../htdocs/comm/mailing/targetemailing.php - - - message: '#^Variable \$filter might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/comm/mailing/targetemailing.php - - message: '#^Call to function property_exists\(\) with Propal and ''module'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -1560,12 +1536,6 @@ parameters: count: 1 path: ../../../htdocs/comm/propal/card.php - - - message: '#^Variable \$classname might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/comm/propal/card.php - - message: '#^Result of && is always false\.$#' identifier: booleanAnd.alwaysFalse @@ -1584,18 +1554,6 @@ parameters: count: 1 path: ../../../htdocs/commande/card.php - - - message: '#^Variable \$classname might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../../htdocs/commande/card.php - - - - message: '#^Variable \$socid might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/commande/customer.php - - message: '#^Call to function is_array\(\) with array\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -1620,12 +1578,6 @@ parameters: count: 5 path: ../../../htdocs/compta/accounting-files.php - - - message: '#^Variable \$modulepart might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/compta/accounting-files.php - - message: '#^Call to function is_array\(\) with array will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -1728,18 +1680,6 @@ parameters: count: 1 path: ../../../htdocs/compta/bank/class/paymentvarious.class.php - - - message: '#^Variable \$id might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/compta/bank/graph.php - - - - message: '#^Variable \$max might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../../htdocs/compta/bank/graph.php - - message: '#^Right side of && is always true\.$#' identifier: booleanAnd.rightAlwaysTrue @@ -1758,18 +1698,6 @@ parameters: count: 1 path: ../../../htdocs/compta/bank/line.php - - - message: '#^Variable \$filepath might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/compta/bank/line.php - - - - message: '#^Variable \$oldfilepath might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/compta/bank/line.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -1794,12 +1722,6 @@ parameters: count: 1 path: ../../../htdocs/compta/bank/list.php - - - message: '#^Variable \$num might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../../htdocs/compta/bank/list.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -1818,12 +1740,6 @@ parameters: count: 1 path: ../../../htdocs/compta/bank/treso.php - - - message: '#^Variable \$id might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/compta/bank/treso.php - - message: '#^Call to function is_array\(\) with array will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -2028,12 +1944,6 @@ parameters: count: 1 path: ../../../htdocs/compta/facture/card.php - - - message: '#^Variable \$classname might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/compta/facture/card.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -2748,12 +2658,6 @@ parameters: count: 1 path: ../../../htdocs/contact/card.php - - - message: '#^Property Contact\:\:\$roles \(array\\|null\) does not accept array\\.$#' - identifier: assign.propertyType - count: 2 - path: ../../../htdocs/contact/card.php - - message: '#^Ternary operator condition is always true\.$#' identifier: ternary.alwaysTrue @@ -2979,54 +2883,6 @@ parameters: - message: '#^Variable \$action might not be defined\.$#' identifier: variable.undefined - count: 2 - path: ../../../htdocs/core/ajax/ajaxdirpreview.php - - - - message: '#^Variable \$dolibarr_main_data_root might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/ajax/ajaxdirpreview.php - - - - message: '#^Variable \$section might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/ajax/ajaxdirpreview.php - - - - message: '#^Variable \$showonrightsize might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/core/ajax/ajaxdirpreview.php - - - - message: '#^Variable \$sortfield might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/ajax/ajaxdirpreview.php - - - - message: '#^Variable \$sortorder might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/ajax/ajaxdirpreview.php - - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/ajax/ajaxdirtree.php - - - - message: '#^Variable \$dolibarr_main_data_root might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/core/ajax/ajaxdirtree.php - - - - message: '#^Variable \$module might not be defined\.$#' - identifier: variable.undefined count: 1 path: ../../../htdocs/core/ajax/ajaxdirtree.php @@ -3036,12 +2892,6 @@ parameters: count: 1 path: ../../../htdocs/core/ajax/ajaxdirtree.php - - - message: '#^Variable \$section might not be defined\.$#' - identifier: variable.undefined - count: 5 - path: ../../../htdocs/core/ajax/ajaxdirtree.php - - message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -3084,12 +2934,6 @@ parameters: count: 1 path: ../../../htdocs/core/ajax/selectobject.php - - - message: '#^Variable \$filter might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/ajax/selectobject.php - - message: '#^Call to function is_array\(\) with array\, mixed\> will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -3972,88 +3816,10 @@ parameters: count: 1 path: ../../../htdocs/core/class/utils_diff.class.php - - - message: '#^Cannot access property \$db on mixed\.$#' - identifier: property.nonObject - count: 2 - path: ../../../htdocs/core/commonfieldsinexport.inc.php - - - - message: '#^Cannot access property \$export_TypeFields_array on mixed\.$#' - identifier: property.nonObject - count: 1 - path: ../../../htdocs/core/commonfieldsinexport.inc.php - - - - message: '#^Cannot access property \$export_entities_array on mixed\.$#' - identifier: property.nonObject - count: 1 - path: ../../../htdocs/core/commonfieldsinexport.inc.php - - - - message: '#^Cannot access property \$export_fields_array on mixed\.$#' - identifier: property.nonObject - count: 1 - path: ../../../htdocs/core/commonfieldsinexport.inc.php - - - - message: '#^Cannot access property \$export_help_array on mixed\.$#' - identifier: property.nonObject - count: 1 - path: ../../../htdocs/core/commonfieldsinexport.inc.php - - message: '#^Variable \$r might not be defined\.$#' identifier: variable.undefined count: 4 - path: ../../../htdocs/core/commonfieldsinexport.inc.php - - - - message: '#^Variable \$this might not be defined\.$#' - identifier: variable.undefined - count: 6 - path: ../../../htdocs/core/commonfieldsinexport.inc.php - - - - message: '#^Cannot access property \$db on mixed\.$#' - identifier: property.nonObject - count: 2 - path: ../../../htdocs/core/commonfieldsinimport.inc.php - - - - message: '#^Cannot access property \$import_TypeFields_array on mixed\.$#' - identifier: property.nonObject - count: 1 - path: ../../../htdocs/core/commonfieldsinimport.inc.php - - - - message: '#^Cannot access property \$import_entities_array on mixed\.$#' - identifier: property.nonObject - count: 1 - path: ../../../htdocs/core/commonfieldsinimport.inc.php - - - - message: '#^Cannot access property \$import_fields_array on mixed\.$#' - identifier: property.nonObject - count: 1 - path: ../../../htdocs/core/commonfieldsinimport.inc.php - - - - message: '#^Cannot access property \$import_help_array on mixed\.$#' - identifier: property.nonObject - count: 1 - path: ../../../htdocs/core/commonfieldsinimport.inc.php - - - - message: '#^Variable \$r might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/core/commonfieldsinimport.inc.php - - - - message: '#^Variable \$this might not be defined\.$#' - identifier: variable.undefined - count: 6 path: ../../../htdocs/core/commonfieldsinimport.inc.php - @@ -5076,12 +4842,6 @@ parameters: count: 2 path: ../../../htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php - - - message: '#^Method ModeleProductCode\:\:liste_modeles\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/core/modules/product/modules_product.class.php - - message: '#^Call to function is_array\(\) with array will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -5376,12 +5136,6 @@ parameters: count: 1 path: ../../../htdocs/core/tpl/filemanager.tpl.php - - - message: '#^Variable \$websitekey might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/filemanager.tpl.php - - message: '#^Variable \$sql might not be defined\.$#' identifier: variable.undefined @@ -6552,12 +6306,6 @@ parameters: count: 1 path: ../../../htdocs/hrm/class/skillrank.class.php - - - message: '#^Method SkillRank\:\:getLinesArray\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/hrm/class/skillrank.class.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -6648,12 +6396,6 @@ parameters: count: 2 path: ../../../htdocs/hrm/skill_tab.php - - - message: '#^PHPDoc tag @var for variable \$objects has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/hrm/skill_tab.php - - message: '#^Variable \$object might not be defined\.$#' identifier: variable.undefined @@ -7212,12 +6954,6 @@ parameters: count: 1 path: ../../../htdocs/modulebuilder/template/admin/myobject_extrafields.php - - - message: '#^Negated boolean expression is always false\.$#' - identifier: booleanNot.alwaysFalse - count: 1 - path: ../../../htdocs/modulebuilder/template/admin/setup.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -7596,12 +7332,6 @@ parameters: count: 1 path: ../../../htdocs/mrp/class/mo.class.php - - - message: '#^Method Mo\:\:fetchAll\(\) has parameter \$filter with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/mrp/class/mo.class.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -7674,12 +7404,6 @@ parameters: count: 1 path: ../../../htdocs/opensurvey/class/opensurveysondage.class.php - - - message: '#^Offset int\<0, max\> on array\, int\<0, max\>\> in isset\(\) always exists and is not nullable\.$#' - identifier: isset.offset - count: 1 - path: ../../../htdocs/opensurvey/results.php - - message: '#^Variable \$erreur_ajout_date in isset\(\) always exists and is not nullable\.$#' identifier: isset.variable @@ -7878,24 +7602,6 @@ parameters: count: 1 path: ../../../htdocs/product/admin/product_tools.php - - - message: '#^Property ActionsCardProduct\:\:\$field_list has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/product/canvas/product/actions_card_product.class.php - - - - message: '#^Property ActionsCardService\:\:\$field_list has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/product/canvas/service/actions_card_service.class.php - - - - message: '#^Property ActionsCardService\:\:\$tpl has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/product/canvas/service/actions_card_service.class.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -8310,12 +8016,6 @@ parameters: count: 1 path: ../../../htdocs/product/stock/stocktransfer/class/stocktransferline.class.php - - - message: '#^Method StockTransferLine\:\:fetchAll\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/product/stock/stocktransfer/class/stocktransferline.class.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -8598,18 +8298,6 @@ parameters: count: 1 path: ../../../htdocs/projet/ganttview.php - - - message: '#^Variable \$colorseries might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/projet/graph_opportunities.inc.php - - - - message: '#^Variable \$mine might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/projet/graph_opportunities.inc.php - - message: '#^Comparison operation "\>" between 0 and 0 is always false\.$#' identifier: greater.alwaysFalse @@ -9372,12 +9060,6 @@ parameters: count: 1 path: ../../../htdocs/public/stripe/ipn.php - - - message: '#^Dead catch \- Exception is never thrown in the try block\.$#' - identifier: catch.neverThrown - count: 1 - path: ../../../htdocs/public/stripe/ipn.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -10026,12 +9708,6 @@ parameters: count: 2 path: ../../../htdocs/societe/class/societe.class.php - - - message: '#^Method Societe\:\:getContacts\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/societe/class/societe.class.php - - message: '#^Property Contact\:\:\$roles \(array\\|null\) does not accept non\-empty\-list\\.$#' identifier: assign.propertyType @@ -10110,12 +9786,6 @@ parameters: count: 1 path: ../../../htdocs/societe/paymentmodes.php - - - message: '#^Variable \$sql might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/societe/paymentmodes.php - - message: '#^Loose comparison using \=\= between ''add_customer_price'' and ''add_customer_price'' will always evaluate to true\.$#' identifier: equal.alwaysTrue @@ -10134,12 +9804,6 @@ parameters: count: 2 path: ../../../htdocs/societe/price.php - - - message: '#^Variable \$prodcustprice might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../../htdocs/societe/price.php - - message: '#^Variable \$massaction might not be defined\.$#' identifier: variable.undefined @@ -10458,12 +10122,6 @@ parameters: count: 1 path: ../../../htdocs/ticket/class/cticketcategory.class.php - - - message: '#^Method CTicketCategory\:\:fetchAll\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/ticket/class/cticketcategory.class.php - - message: '#^Call to function array_key_exists\(\) with ''paths'' and array\{paths\: mixed, names\: mixed, mimes\: mixed\} will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -10728,12 +10386,6 @@ parameters: count: 1 path: ../../../htdocs/variants/class/ProductCombination.class.php - - - message: '#^Property ProductCombination\:\:\$variation_price_percentage type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: ../../../htdocs/variants/class/ProductCombination.class.php - - message: '#^Call to function is_array\(\) with array\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index bf007f29b00..09089246e89 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -1558,7 +1558,7 @@ class BOM extends CommonObject /** * Get/add Net needs Tree by product or bom * - * @param array $TNetNeeds Array of ChildBom and infos linked to + * @param array,bom:BOM,parentid:int,qty:float,level:int,position:int,fk_unit:?int}> $TNetNeeds Array of ChildBom and infos linked to * @param float $qty qty needed (used as a factor to produce 1 unit) * @param int<0,1000> $level level of recursivity * @return void From f11738c88881689130db025c228c9c7a4fa51b88 Mon Sep 17 00:00:00 2001 From: Pcauderlier <118035528+Pcauderlier@users.noreply.github.com> Date: Mon, 4 May 2026 17:37:40 +0200 Subject: [PATCH 2/2] FIX Add missing addMoreActionsButtons hook in mailing card actions (#38083) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix perms * Fix CI * UX Accountancy - Ledger - Add icon for more comprehension * Fix phpunit * Debug v23 * Debug v23 * Fix CI * Qual: Update PHP-CS-Fixer configuration and DolibarrModules class - Update PHP-CS-Fixer configuration to replace deprecated 'visibility_required' rule with 'modifier_keywords' - Update DolibarrModules class to use const instead of public const for PHP 7.0 compatibility (revert recent change) * fix warning in upgrade2.php * Debug v23 * add modulepart for direct print capabilities * add project * add project * add more * add ficheuinter * qual: Update phpstan-baseline.neon to remove unresolvable type issues Removed multiple entries related to unresolvable types in dol_sort_array function calls and property assignments. * FIX #36447 Email Collector subject/body exclusion filters not working The '!' prefix was removed at line 1369-1373 before being tested at lines 1398 and 1406, causing exclusion filters to never work. This fix uses the $not variable (already set correctly) instead of re-testing for '!' on the modified rulevalue. * Qual: Improve type hinting for phpstan in dol_sort_array() #Qual: Improve type hinting for phpstan in dol_sort_array() - Improve phpdoc for phpstan in dol_sort_array() * qual: Add type hint for $arraydata in select_juridicalstatus method This change adds a type hint for the $arraydata variable in the select_juridicalstatus method for phpstan * Qual: Change array assignment for phpstan type deduction * Qual: Change array assignment for phpstan type deduction * Qual: Cast properties to string in get_full_arbo method * Qual: Type casting in select_country and loadCacheInputReason methods * fix: Improve type casting and array initialization in user.class.php - Added explicit type casting for array values - Improved array initialization syntax for better readability and maintainability * qual: Add type hint for group_list array Add a type hint for the $group_list array for phpstan. * qual: Update type hints and casting in select_juridicalstatus method - Changed type hint for $arraydata - Added explicit casting for `code` and `country_code` in the array assignment * Qual: Cast label to string to ensure type consistency (phpstan) * Qual: Add types for $workflow and $workflowcodes. * Update upgrade2.php * Debug v23 * Doc * CSS * Doc * Fix prevent use of TRACE method in waf * FIX: reinstate shipment with origin * add another * implem * fix space * add another * fix space * CSS * Fix webhook history record save on error * fix CI * fix missing migration * fix missing migration * add more * add more * add more * add more * add more * add more * add more * PHPStan > Update baseline * FIX: ticket module - use random_int() for secure ID generation instead of microtime * ENH: Accessibility on modulebuilder setup page Add label for input fields * Clarify supported versions for security reports * Update supported versions for security reports * Add default supplier type handling in card.php in creation mode Hi By default supplier is a professional in creation mode. * Add default supplier type handling in card.php in creation mode * CSS * Add new phpunit tests * Comment * Debug v23 * Comment * Update ticket.lib.php * Fix: Do not transform [__XXX__] string when MAIN_RESTRICTHTML_ONLY_VALID_HTML is on. * Update card.php * Fix formatting and add new line in card.php * CSS * Modification of the family VARCHAR field to VARCHAR(64), causing the failure of module re-activation. * FIX must not allow deletion of invoice if printed or sent by email. * Debug v23 * clean code * Trans * FIX: now there are two values for INVOICE_USE_SITUATION (1 = legacy, 2 = new), leading to two interpretations of situation_percent; in some algorithms, only the old algorithm was applied even when the new mode was on * FIX: now there are two values for INVOICE_USE_SITUATION (1 = legacy, 2 = new), leading to two interpretations of situation_percent; in some algorithms, only the old algorithm was applied even when the new mode was on * WIP Loi finance * Fix yearly events and duplicate recurring events * Debug v23 * Fix LNE * Update addTimeSpent api method to use default progress with null parameters, swagger validator fail * Fix permission check from 'lire' to 'read' * FIX: use suspended status in FactureFournisseurRec::updateline() - The method checks `$this->status == self::STATUS_SUSPENDED`. - For recurring **supplier** invoices, `$this->status` is not populated (it is always `null`). - The real field used to store the suspended flag of the template is `$this->suspended`. * Fix replace DISTINCT * Fix progress assignment in addTimeSpent method * FIX: INVOICE_USE_SITUATION (1 = legacy, 2 = new): some functions still use only the legacy algorithm * FIX wrong indentation * WIP LNE * FIX missing space before cast * FIX bad ratio calculation * phpdoc: wrong return type * WIP LNE * Fix setup margin * CSS * Update blockedlog.php * new: defaut to True show unit price on title and sub total * Debug v23 - Navigation in timespent and style * Trans * Fix detection of security commit * Fix detection of security commit * Fix warning * Fix webportal css * Debug v23 * CSS * Fix warning * Fix warning * Fixed shipping and availability updating. Updated contributor details. * FIX #36407 BUG: API POST contact to a non-existing socid gives DB error * Update blockedlog.php * Fix CI * Fix CI * Better compatibility * Fix CI * Fix CI * CSS * Fix dialog for iframe * restaure times * Fix isset usage * Fix isset usage * Allow to define if data is user input or not into GETPOSTFLOAT. * Typo * Update holiday api methods from setValidate/setApproved to validate/approve * CSS * Doc * Debug v23 * Fix some phan warnings * remove var_dump * Fix for #36550 there are \n and other characters that need to get handled here, otherwise they will get replaced with space character later. * CSS * Translation * Debug v23 * Debug v23 * Debug v23 * Fix var_dump * Debug v23 - fix link social networks * Debug v23 - hide field with unknown meaning. * fix modal css and display * Fix CI * Update odf.php * Added postLine method to expense report API. Added mandatory expense report line fields check. * Added deleteLine method. Updated contributor details. * Added getLines method * Added setToDraft method * Cleaned code * Updated PHPDoc * Updated PHPDoc * Updated PHPDoc * Added cancel exepense report method * Added return object * CSS * CSS * Fix CI * Fix CI * CSS * CSS * CSS * CSS * Debug v23. Bad balance ul/li in menu. * Debug v23 * FIX Add missing addMoreActionsButtons hook in mailing card actions Add missing call to addMoreActionsButtons hook in mailing card.php to allow external modules to inject custom action buttons, ensuring consistency with other modules. --------- Co-authored-by: Laurent Destailleur Co-authored-by: Laurent Destailleur Co-authored-by: Alexandre SPANGARO Co-authored-by: MDW Co-authored-by: Frédéric FRANCE Co-authored-by: Frédéric FRANCE Co-authored-by: Steph501 Co-authored-by: Lucas Marcouiller Co-authored-by: Mélina JOUM Co-authored-by: Rémi Champlon Co-authored-by: Lucas Marcouiller <45882981+Hystepik@users.noreply.github.com> Co-authored-by: Dolibot Co-authored-by: atm-jonathan Co-authored-by: Benjamin Falière Co-authored-by: Francis <162715304+le-reparateur@users.noreply.github.com> Co-authored-by: atm-nicolasV Co-authored-by: atm-florian Co-authored-by: Charlène Benke <1179011+defrance@users.noreply.github.com> Co-authored-by: lelex86 <75493227+lelex86@users.noreply.github.com> Co-authored-by: Florian HENRY Co-authored-by: John BOTELLA <68917336+thersane-john@users.noreply.github.com> Co-authored-by: William Mead Co-authored-by: Jon Bendtsen Co-authored-by: Joachim Kueter --- htdocs/comm/mailing/card.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 7d28dd51c09..c1f742c2ab3 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -1272,6 +1272,9 @@ if ($action == 'create') { // aaa if (GETPOST('cancel', 'alpha') || $confirm == 'no' || $action == '' || in_array($action, array('settodraft', 'valid', 'delete', 'sendall', 'clone', 'test', 'editevenunsubscribe'))) { print "\n\n
\n"; + $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); + + if (($object->status == 1) && ($user->hasRight('mailing', 'valider') || $object->user_validation_id == $user->id)) { print ''.$langs->trans("SetToDraft").''; }