diff --git a/lam/lib/tools/fileUpload.inc b/lam/lib/tools/fileUpload.inc index 8839b736..e0f108cf 100644 --- a/lam/lib/tools/fileUpload.inc +++ b/lam/lib/tools/fileUpload.inc @@ -115,7 +115,9 @@ class toolFileUpload implements \LAMTool { * @return boolean visible */ function isVisible() { - return (sizeof($_SESSION['config']->get_ActiveTypes()) > 0); + $typeManager = new \LAM\TYPES\TypeManager(); + $types = $typeManager->getConfiguredTypes(); + return (sizeof($types) > 0); } /** diff --git a/lam/lib/tools/ouEditor.inc b/lam/lib/tools/ouEditor.inc index 5f49143f..4c8c3ef4 100644 --- a/lam/lib/tools/ouEditor.inc +++ b/lam/lib/tools/ouEditor.inc @@ -115,7 +115,9 @@ class toolOUEditor implements \LAMTool { * @return boolean visible */ function isVisible() { - return (sizeof($_SESSION['config']->get_ActiveTypes()) > 0); + $typeManager = new \LAM\TYPES\TypeManager(); + $types = $typeManager->getConfiguredTypes(); + return (sizeof($types) > 0); } /** diff --git a/lam/lib/tools/pdfEdit.inc b/lam/lib/tools/pdfEdit.inc index ed321650..584cd429 100644 --- a/lam/lib/tools/pdfEdit.inc +++ b/lam/lib/tools/pdfEdit.inc @@ -115,7 +115,9 @@ class toolPDFEditor implements \LAMTool { * @return boolean visible */ function isVisible() { - return (sizeof($_SESSION['config']->get_ActiveTypes()) > 0); + $typeManager = new \LAM\TYPES\TypeManager(); + $types = $typeManager->getConfiguredTypes(); + return (sizeof($types) > 0); } /** diff --git a/lam/lib/tools/profileEditor.inc b/lam/lib/tools/profileEditor.inc index 36f88eed..d75fb953 100644 --- a/lam/lib/tools/profileEditor.inc +++ b/lam/lib/tools/profileEditor.inc @@ -115,7 +115,9 @@ class toolProfileEditor implements \LAMTool { * @return boolean visible */ function isVisible() { - return (sizeof($_SESSION['config']->get_ActiveTypes()) > 0); + $typeManager = new \LAM\TYPES\TypeManager(); + $types = $typeManager->getConfiguredTypes(); + return (sizeof($types) > 0); } /** diff --git a/lam/lib/tools/tests.inc b/lam/lib/tools/tests.inc index e9ff660d..c2cc4d61 100644 --- a/lam/lib/tools/tests.inc +++ b/lam/lib/tools/tests.inc @@ -128,7 +128,9 @@ class toolTests implements \LAMTool { * @return boolean visible */ function isVisible() { - return (sizeof($_SESSION['config']->get_ActiveTypes()) > 0); + $typeManager = new \LAM\TYPES\TypeManager(); + $types = $typeManager->getConfiguredTypes(); + return (sizeof($types) > 0); } /**