From 3334532e8cb138c4b32dc6bbf7203d5b659068cf Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 15 Dec 2017 11:19:54 +0100 Subject: [PATCH] =?utf8?q?Revert=20"CVar-Helfer:=20cvars=5Fby=5Fconfig=20n?= =?utf8?q?ach=20Config-Reihenfolge=20sortiert=20zur=C3=BCckgeben"?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This reverts commit 6e1a7a2e06de426b553ada3aed39f28b4825d0ce. Die Funktion `_all_configs` liefert die Konfigurationen bereits sortiert. Schlimmer ist, dass `sort_by` nicht numerisch sondern alphabetisch sortiert, sodass `sortkey = 10` vor `sortkey = 2` kommt. --- SL/DB/Helper/CustomVariables.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/SL/DB/Helper/CustomVariables.pm b/SL/DB/Helper/CustomVariables.pm index a82397c5e..a6ab5ae18 100644 --- a/SL/DB/Helper/CustomVariables.pm +++ b/SL/DB/Helper/CustomVariables.pm @@ -4,7 +4,7 @@ use strict; use Carp; use Data::Dumper; use List::Util qw(first); -use List::UtilsBy qw(sort_by partition_by); +use List::UtilsBy qw(partition_by); use constant META_CVARS => 'cvars_config'; @@ -104,8 +104,6 @@ sub make_cvar_by_configs { @$configs ); - @return = sort_by { $_->config->sortkey } @return; - return \@return; } } -- 2.20.1