Added the fix for natural order sorting if present

This commit is contained in:
Sachin Bahukhandi 2024-02-04 00:01:30 +05:30
parent 2866fe712e
commit b262837ef7

View File

@ -27,7 +27,9 @@ use function htmlspecialchars;
use function in_array;
use function mb_strtoupper;
use function sprintf;
use function strnatcasecmp;
use function trim;
use function usort;
/**
* Triggers management.
@ -202,6 +204,10 @@ final class IndexController extends AbstractController
if ($item !== null) {
$tables = $this->triggers->getTables(Current::$database);
if (Config::getInstance()->settings['NaturalOrder']) {
usort($tables, strnatcasecmp(...));
}
$editor = $this->template->render('triggers/editor_form', [
'db' => Current::$database,
'table' => Current::$table,