Rewritten extensions system to enable per company module/plugin
[fa-stable.git] / applications / manufacturing.php
index ffcfc021791153510409d1e068b1cc18e827aa41..fba05a7d7a824d8603890d752f1d4009d1e23cb4 100644 (file)
@@ -13,7 +13,7 @@
        {
                function manufacturing_app()
                {
-                       global $installed_modules;
+                       global $installed_extensions;
                        $this->application("manuf",_("&Manufacturing"));
 
                        $this->add_module(_("Transactions"));
                        $this->add_module(_("Maintenance"));
                        $this->add_lapp_function(2, _("&Bills Of Material"),"manufacturing/manage/bom_edit.php?");
                        $this->add_lapp_function(2, _("&Work Centres"),"manufacturing/manage/work_centres.php?");
-                       if (count($installed_modules) > 0)
+                       if (count($installed_extensions) > 0)
                        {
-                               foreach ($installed_modules as $mod)
+                               foreach ($installed_extensions as $mod)
                                {
-                                       if ($mod["tab"] == "manuf")
-                                               $this->add_rapp_function(2, $mod["name"], "modules/".$mod["path"]."/".$mod["filename"]."?");
+                                       if (@$mod['active'] && $mod['type'] == 'plugin' && $mod["tab"] == "manuf")
+                                               $this->add_rapp_function(2, $mod["title"], "modules/".$mod["path"]."/".$mod["filename"]."?");
                                }
                        }
                }