From 9eff49c13adb5e0b0170ded6d9da2661944c2b42 Mon Sep 17 00:00:00 2001 From: stonebuzz Date: Fri, 17 Nov 2023 12:10:40 +0100 Subject: [PATCH 1/4] fix object entries ordering --- inc/typefamily.class.php | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/inc/typefamily.class.php b/inc/typefamily.class.php index 1f7b38a..434dd0a 100644 --- a/inc/typefamily.class.php +++ b/inc/typefamily.class.php @@ -101,14 +101,15 @@ public static function getFamilies() } - public static function getItemtypesByFamily($families_id) - { - return getAllDataFromTable( - 'glpi_plugin_genericobject_types', - [ - 'plugin_genericobject_typefamilies_id' => $families_id, - 'is_active' => 1 - ] - ); - } + static function getItemtypesByFamily($families_id) + { + return getAllDataFromTable( + 'glpi_plugin_genericobject_types', + [ + 'plugin_genericobject_typefamilies_id' => $families_id, + 'is_active' => 1 + + ] + ['ORDER' => 'name'] + ); + } } From 33c71e0043dde6f64e018a973a2d61c174ceb089 Mon Sep 17 00:00:00 2001 From: stonebuzz Date: Fri, 17 Nov 2023 13:23:58 +0100 Subject: [PATCH 2/4] fix CS --- inc/typefamily.class.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/inc/typefamily.class.php b/inc/typefamily.class.php index 434dd0a..5faa517 100644 --- a/inc/typefamily.class.php +++ b/inc/typefamily.class.php @@ -101,15 +101,15 @@ public static function getFamilies() } - static function getItemtypesByFamily($families_id) - { - return getAllDataFromTable( - 'glpi_plugin_genericobject_types', - [ - 'plugin_genericobject_typefamilies_id' => $families_id, - 'is_active' => 1 + static function getItemtypesByFamily($families_id) + { + return getAllDataFromTable( + 'glpi_plugin_genericobject_types', + [ + 'plugin_genericobject_typefamilies_id' => $families_id, + 'is_active' => 1 - ] + ['ORDER' => 'name'] - ); - } + ] + ['ORDER' => 'name'] + ); + } } From 70e6fe9ad2a16f47573a78d869245af201d8bbf3 Mon Sep 17 00:00:00 2001 From: stonebuzz Date: Fri, 17 Nov 2023 14:12:10 +0100 Subject: [PATCH 3/4] fix CS --- inc/typefamily.class.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/inc/typefamily.class.php b/inc/typefamily.class.php index 5faa517..427376d 100644 --- a/inc/typefamily.class.php +++ b/inc/typefamily.class.php @@ -101,15 +101,15 @@ public static function getFamilies() } - static function getItemtypesByFamily($families_id) + public static function getItemtypesByFamily($families_id) { - return getAllDataFromTable( - 'glpi_plugin_genericobject_types', - [ - 'plugin_genericobject_typefamilies_id' => $families_id, - 'is_active' => 1 + return getAllDataFromTable( + 'glpi_plugin_genericobject_types', + [ + 'plugin_genericobject_typefamilies_id' => $families_id, + 'is_active' => 1 - ] + ['ORDER' => 'name'] - ); + ] + ['ORDER' => 'name'] + ); } } From 8cebb216d58cb3ae164115b9c0789a0fb4c3db98 Mon Sep 17 00:00:00 2001 From: stonebuzz Date: Fri, 17 Nov 2023 14:35:47 +0100 Subject: [PATCH 4/4] remove empty useless line --- inc/typefamily.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/inc/typefamily.class.php b/inc/typefamily.class.php index 427376d..87e9cb9 100644 --- a/inc/typefamily.class.php +++ b/inc/typefamily.class.php @@ -108,7 +108,6 @@ public static function getItemtypesByFamily($families_id) [ 'plugin_genericobject_typefamilies_id' => $families_id, 'is_active' => 1 - ] + ['ORDER' => 'name'] ); }