fixed tool visibility

This commit is contained in:
Roland Gruber 2012-07-21 09:15:50 +00:00
parent b5102e8395
commit 661f4944a8
1 changed files with 5 additions and 0 deletions

View File

@ -61,6 +61,7 @@ echo "<div class=\"userlist-bright smallPaddingContent\">\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));