From d0b168e333e8e3ded35f62a280c4a3ab1436ae5e Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 28 Nov 2023 22:31:36 +0100 Subject: [PATCH] FIX sort natural to have the trigger 100 after 99 (#26887) * FIX sort natural to have trigger 100 after 99 * FIX wrong trigger status --- htdocs/core/class/interfaces.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php index 623986d6184..33797b7b821 100644 --- a/htdocs/core/class/interfaces.class.php +++ b/htdocs/core/class/interfaces.class.php @@ -167,7 +167,7 @@ class Interfaces } } - asort($orders); + asort($orders, SORT_NATURAL); // Loop on each trigger foreach ($orders as $key => $value) { @@ -305,7 +305,7 @@ class Interfaces } } - asort($orders); + asort($orders, SORT_NATURAL); $triggers = array(); $j = 0; @@ -342,7 +342,7 @@ class Interfaces $module = preg_replace('/^mod/i', '', $reg[2]); if (strtolower($module) == 'all') { $disabledbymodule = 0; - } elseif (!isModEnabled(strtoupper($module))) { + } elseif (!isModEnabled(strtolower($module))) { $disabledbymodule = 2; } $triggers[$j]['module'] = strtolower($module);