Access level checking moved to page() function to make session start and access...
[fa-stable.git] / applications / suppliers.php
index 8aacea962fe9e203777c93597c0ed0ebb14345e5..f7c529e5de173f714ec353d78f6629f752b6e6d1 100644 (file)
@@ -9,13 +9,12 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-       include_once("./modules/installed_modules.php");
        class suppliers_app extends application 
        {
                function suppliers_app() 
                {
-                       global $installed_modules;
-                       $this->application("AP",_("Purchases"));
+                       global $installed_extensions;
+                       $this->application("AP",_("&Purchases"));
                        
                        $this->add_module(_("Transactions"));
                        $this->add_lapp_function(0, _("Purchase &Order Entry"),"purchasing/po_entry_items.php?NewOrder=Yes");
                        
                        $this->add_module(_("Maintenance"));
                        $this->add_lapp_function(2, _("&Suppliers"),"purchasing/manage/suppliers.php?");
-                       if (count($installed_modules) > 0)
+                       if (count($installed_extensions) > 0)
                        {
-                               foreach ($installed_modules as $mod)
+                               foreach ($installed_extensions as $mod)
                                {
-                                       if ($mod["tab"] == "AP")
-                                               $this->add_rapp_function(2, $mod["name"], "modules/".$mod["path"]."/".$mod["filename"]."?");
+                                       if (@$mod['active'] && $mod['type'] == 'plugin' && $mod["tab"] == "AP")
+                                               $this->add_rapp_function(2, $mod["title"], "modules/".$mod["path"]."/".$mod["filename"]."?");
                                }
                        }       
                }