X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FDB%2FHelper%2FCustomVariables.pm;h=373a60cf1cb1e6456cb4967c4ee23fb1a691cdc9;hb=55e399ab36e9b688a4bfbb7b90422fe33e9e14e7;hp=3c43624dbcce7537c1bca81916cc407a3dcd294f;hpb=21436d8b965f90a61813aedba3caa40e9f8eaf80;p=kivitendo-erp.git 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(