X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=frontaccounting.php;h=60ebd99ccd6a0756100474df4f87b9e02b18d073;hb=af78fbb535a6fedbc2eb70a26ddc39739be2b986;hp=7e2201882a74b9f954ca64cfa97c8f69c5df83c4;hpb=f77944f5e2122d5b6e57d5e2718b4760519ec5d2;p=fa-stable.git diff --git a/frontaccounting.php b/frontaccounting.php index 7e220188..60ebd99c 100644 --- a/frontaccounting.php +++ b/frontaccounting.php @@ -24,12 +24,11 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ { foreach ($installed_extensions as $ext) { - include_once($path_to_root."/".$ext['folder']."/".$ext['app_file']); + if ($ext['type'] == 'module') + include_once($path_to_root."/".$ext['path']."/".$ext['filename']); } } - include_once($path_to_root . '/modules/installed_modules.php'); - class front_accounting { var $user; @@ -44,8 +43,9 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ //$this->renderer =& new renderer(); } function add_application(&$app) - { - $this->applications[$app->id] = &$app; + { + if ($app->enabled) // skip inactive modules + $this->applications[$app->id] = &$app; } function get_application($id) { @@ -90,12 +90,15 @@ if (!isset($path_to_root) || isset($_GET['path_to_root']) || isset($_POST['path_ { foreach ($installed_extensions as $ext) { - get_text::add_domain($_SESSION['language']->code, - $ext['folder']."/lang"); - $class = $ext['name']."_app"; - $this->add_application(new $class()); - get_text::add_domain($_SESSION['language']->code, - $path_to_root."/lang"); + if (@($ext['active'] && $ext['type'] == 'module')) { // supressed warnings before 2.2 upgrade + $_SESSION['get_text']->add_domain($_SESSION['language']->code, + $ext['path']."/lang"); + $class = $ext['tab']."_app"; + if (class_exists($class)) + $this->add_application(new $class()); + $_SESSION['get_text']->add_domain($_SESSION['language']->code, + $path_to_root."/lang"); + } } }