X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FHelper%2FCustomVariables.pm;h=373a60cf1cb1e6456cb4967c4ee23fb1a691cdc9;hb=4ee26bcc22fa980555706ca24323ee9c552c1303;hp=3c43624dbcce7537c1bca81916cc407a3dcd294f;hpb=d453cc01303ea4a4a88505f0b98c8ca9fc01141a;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(