Hide empty/disabled tabs.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 22 Apr 2009 21:29:21 +0000 (21:29 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Wed, 22 Apr 2009 21:29:21 +0000 (21:29 +0000)
applications/application.php
frontaccounting.php

index a7c47964b190ee56ed9f4dad2df83970b4b7f824..2b76e2ce9b95da9bd4e8be26b6901c9a0e8d9d6d 100644 (file)
                {
                        $this->id = $id;
                        $this->name = $name;
-                       $this->enables = $enabled;
+                       $this->enabled = $enabled;
                        $this->modules = array();
                }
                
index 7e2201882a74b9f954ca64cfa97c8f69c5df83c4..ffd9c7f56f27ccb6cbcbeb07a6bce3867c5f55f9 100644 (file)
@@ -44,8 +44,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)
                                {