From: Bernd Bleßmann Date: Wed, 18 Sep 2013 09:22:34 +0000 (+0200) Subject: CustomVariables-Helper richtigen Accessor für überladenen Cvars machen lassen. X-Git-Tag: release-3.1.0beta1~69^2~2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=42ca4b6790baf76f507cc3675f4a171223cfde4c;hp=09e32b3c46be20f89fcc1fdf1ae42731044de118;p=kivitendo-erp.git CustomVariables-Helper richtigen Accessor für überladenen Cvars machen lassen. --- diff --git a/SL/DB/Helper/CustomVariables.pm b/SL/DB/Helper/CustomVariables.pm index 3c43624db..373a60cf1 100644 --- a/SL/DB/Helper/CustomVariables.pm +++ b/SL/DB/Helper/CustomVariables.pm @@ -42,8 +42,11 @@ sub save_meta_info { sub make_cvar_accessor { my ($caller_package, %params) = @_; - my @module_filter = $params{module} ? - ("config_id" => [ \"(SELECT custom_variable_configs.id FROM custom_variable_configs WHERE custom_variable_configs.module = '$params{module}')" ]) : + my $modules = ('ARRAY' eq ref $params{module}) ? + join ',', @{ $params{module} } : + $params{module}; + my @module_filter = $modules ? + ("config_id" => [ \"(SELECT custom_variable_configs.id FROM custom_variable_configs WHERE custom_variable_configs.module IN ( '$modules' ))" ]) : # " make emacs happy (); $caller_package->meta->add_relationships(