From: Sven Schöling Date: Wed, 14 Sep 2011 10:39:55 +0000 (+0200) Subject: Verhindern, dass Customvars bei zirkulären Includes mehrfach registriert werden. X-Git-Tag: release-2.7.0beta1~291 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=e7ac04b23e5a184541f31d3f283f456b4c375a0c;p=kivitendo-erp.git Verhindern, dass Customvars bei zirkulären Includes mehrfach registriert werden. --- diff --git a/SL/DB/Helper/CustomVariables.pm b/SL/DB/Helper/CustomVariables.pm index f56e4863e..6b7a5316a 100644 --- a/SL/DB/Helper/CustomVariables.pm +++ b/SL/DB/Helper/CustomVariables.pm @@ -22,7 +22,7 @@ sub import { $params{module} || $params{sub_module} or croak 'need param module or sub_module'; - save_meta_info($caller_package, %params); + return unless save_meta_info($caller_package, %params); make_cvar_accessor($caller_package, %params); make_cvar_alias($caller_package, %params) if $params{cvars_alias}; make_cvar_by_configs($caller_package, %params); @@ -36,6 +36,8 @@ sub save_meta_info { return 0 if $meta->{META_CVARS()}; $meta->{META_CVARS()} = \%params; + + return 1; } sub make_cvar_accessor {