X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/2647d6943850866ac437660e0a16ea965c01c22b..e73f7350574cb4e46db4a4d6ad5cdaa075806489:/SL/DB/Helper/CustomVariables.pm diff --git a/SL/DB/Helper/CustomVariables.pm b/SL/DB/Helper/CustomVariables.pm index 6ebebda41..e80d6fda8 100644 --- a/SL/DB/Helper/CustomVariables.pm +++ b/SL/DB/Helper/CustomVariables.pm @@ -4,6 +4,7 @@ use strict; use Carp; use Data::Dumper; use List::Util qw(first); +use List::UtilsBy qw(sort_by); use constant META_CVARS => 'cvars_config'; @@ -98,6 +99,8 @@ sub make_cvar_by_configs { @$configs ); + @return = sort_by { $_->config->sortkey } @return; + return \@return; } } @@ -327,7 +330,7 @@ sub make_cvar_custom_filter { # remove rose aliases. query builder sadly is not reentrant, and will reuse the same aliases. :( $query{$key} =~ s{\bt\d+(?:\.)?\b}{}g; - # manually inline the values. again, rose doen't know how to handle bind params in subqueries :( + # manually inline the values. again, rose doesn't know how to handle bind params in subqueries :( $query{$key} =~ s{\?}{ $config->dbh->quote(shift @{ $bind_vals{$key} }) }xeg; $query{$key} =~ s{\n}{ }g; @@ -419,7 +422,7 @@ passed to import. =item C -Thi will return a list of CVars with the following changes over the standard accessor: +This will return a list of CVars with the following changes over the standard accessor: =over 4 @@ -510,6 +513,23 @@ If the Manager for the calling C has included the helper Ls.schoeling@linet-services.deE,