From 661f4944a80f472b2f2dbfa76fa05f09bd858725 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 21 Jul 2012 09:15:50 +0000 Subject: [PATCH] fixed tool visibility --- lam/templates/tools.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lam/templates/tools.php b/lam/templates/tools.php index f7a04996..c7f19544 100644 --- a/lam/templates/tools.php +++ b/lam/templates/tools.php @@ -61,6 +61,7 @@ echo "
\n"; // print tools table $container = new htmlTable(); $container->addElement(new htmlTitle(_('Tools')), true); +$toolSettings = $_SESSION['config']->getToolSettings(); for ($i = 0; $i < sizeof($tools); $i++) { // check access level @@ -74,6 +75,10 @@ for ($i = 0; $i < sizeof($tools); $i++) { if (!$tools[$i]->isVisible()) { continue; } + // check if hidden by config + if (isset($toolSettings['tool_hide_' . get_class($tools[$i])]) && ($toolSettings['tool_hide_' . get_class($tools[$i])] == 'true')) { + continue; + } // add tool $container->addElement(new htmlLink($tools[$i]->getName(), $tools[$i]->getLink(), '../graphics/' . $tools[$i]->getImageLink())); $container->addElement(new htmlSpacer('10px', null));