From: Janusz Dobrowolski Date: Mon, 28 Sep 2009 14:52:43 +0000 (+0000) Subject: Access level extension inclusions only for active extensions. X-Git-Tag: v2.4.2~19^2~1198 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=8283d5636d40f8a55a79cf1a7c7534da64429c7e;p=fa-stable.git Access level extension inclusions only for active extensions. --- diff --git a/includes/access_levels.inc b/includes/access_levels.inc index 3c60a092..a61d4b3b 100644 --- a/includes/access_levels.inc +++ b/includes/access_levels.inc @@ -246,10 +246,10 @@ function add_access_extensions() global $path_to_root, $security_areas, $security_sections; // Add extension private access levels - include($path_to_root.'/installed_extensions.php'); + include($path_to_root.'/company/'.user_company().'/installed_extensions.php'); foreach($installed_extensions as $ext) { - if (isset($ext['acc_file'])) - include_once($path_to_root.($ext['type'] == 'plugin' ? '/modules/':'/').$ext['path'].'/'.$ext['acc_file']); + if (@$ext['active'] && isset($ext['acc_file'])) + include($path_to_root.($ext['type'] == 'plugin' ? '/modules/':'/').$ext['path'].'/'.$ext['acc_file']); } } ?> \ No newline at end of file