diff --git a/lam/lib/lists.inc b/lam/lib/lists.inc index ce0513a8..c98f93da 100644 --- a/lam/lib/lists.inc +++ b/lam/lib/lists.inc @@ -697,7 +697,8 @@ class lamList { echo "\n"; } $type = new $this->type(); - if ($type->supportsFileUpload()) { + $toolSettings = $_SESSION['config']->getToolSettings(); + if ($type->supportsFileUpload() && !(isset($toolSettings['tool_hide_toolFileUpload']) && ($toolSettings['tool_hide_toolFileUpload'] == 'true'))) { echo '      '; echo "\n"; } diff --git a/lam/lib/tools/fileUpload.inc b/lam/lib/tools/fileUpload.inc index 9001f415..af7a2fff 100644 --- a/lam/lib/tools/fileUpload.inc +++ b/lam/lib/tools/fileUpload.inc @@ -123,7 +123,7 @@ class toolFileUpload implements LAMTool { * @return boolean hideable */ function isHideable() { - return false; + return true; } } diff --git a/lam/lib/tools/pdfEdit.inc b/lam/lib/tools/pdfEdit.inc index 948bd1a7..33cfffc4 100644 --- a/lam/lib/tools/pdfEdit.inc +++ b/lam/lib/tools/pdfEdit.inc @@ -123,7 +123,7 @@ class toolPDFEditor implements LAMTool { * @return boolean hideable */ function isHideable() { - return false; + return true; } } diff --git a/lam/lib/tools/profileEditor.inc b/lam/lib/tools/profileEditor.inc index d464bc52..1771c4e4 100644 --- a/lam/lib/tools/profileEditor.inc +++ b/lam/lib/tools/profileEditor.inc @@ -123,7 +123,7 @@ class toolProfileEditor implements LAMTool { * @return boolean hideable */ function isHideable() { - return false; + return true; } } diff --git a/lam/lib/types/dhcp.inc b/lam/lib/types/dhcp.inc index 05c19f9a..46a7a4bc 100644 --- a/lam/lib/types/dhcp.inc +++ b/lam/lib/types/dhcp.inc @@ -249,8 +249,11 @@ class lamDHCPList extends lamList { if (!$createOnly) { echo ("\n"); } - echo '      '; - echo "\n"; + $toolSettings = $_SESSION['config']->getToolSettings(); + if (!(isset($toolSettings['tool_hide_toolFileUpload']) && ($toolSettings['tool_hide_toolFileUpload'] == 'true'))) { + echo '      '; + echo "\n"; + } echo '      '; echo ("\n"); echo "   "; diff --git a/lam/templates/main_header.php b/lam/templates/main_header.php index 9be9dc07..4a084857 100644 --- a/lam/templates/main_header.php +++ b/lam/templates/main_header.php @@ -131,6 +131,7 @@ foreach ($toSort as $key => $value) { 0) { ?>
  • tools  @@ -160,6 +161,7 @@ foreach ($toSort as $key => $value) {
  • get_Suffix('tree') != "") { ?>
  • diff --git a/lam/templates/massBuildAccounts.php b/lam/templates/massBuildAccounts.php index 68a4e5c7..b49316c5 100644 --- a/lam/templates/massBuildAccounts.php +++ b/lam/templates/massBuildAccounts.php @@ -41,6 +41,9 @@ include_once('../lib/modules.inc'); // Start session startSecureSession(); +// check if this tool may be run +checkIfToolIsActive('toolFileUpload'); + // die if no write access if (!checkIfWriteAccessIsAllowed()) die(); diff --git a/lam/templates/massDoUpload.php b/lam/templates/massDoUpload.php index 93793ae8..993e8971 100644 --- a/lam/templates/massDoUpload.php +++ b/lam/templates/massDoUpload.php @@ -45,6 +45,9 @@ include_once('../lib/pdf.inc'); // Start session startSecureSession(); +// check if this tool may be run +checkIfToolIsActive('toolFileUpload'); + // die if no write access if (!checkIfWriteAccessIsAllowed()) die(); diff --git a/lam/templates/masscreate.php b/lam/templates/masscreate.php index a8daa6d0..e9eeded3 100644 --- a/lam/templates/masscreate.php +++ b/lam/templates/masscreate.php @@ -43,6 +43,9 @@ include_once('../lib/pdfstruct.inc'); // Start session startSecureSession(); +// check if this tool may be run +checkIfToolIsActive('toolFileUpload'); + // die if no write access if (!checkIfWriteAccessIsAllowed()) die(); diff --git a/lam/templates/pdfedit/pdfpage.php b/lam/templates/pdfedit/pdfpage.php index ade708d8..7c337704 100644 --- a/lam/templates/pdfedit/pdfpage.php +++ b/lam/templates/pdfedit/pdfpage.php @@ -51,6 +51,8 @@ startSecureSession(); // die if no write access if (!checkIfWriteAccessIsAllowed()) die(); +checkIfToolIsActive('toolPDFEditor'); + setlanguage(); // check if user is logged in, if not go to login diff --git a/lam/templates/profedit/profilepage.php b/lam/templates/profedit/profilepage.php index d4b34f9d..2e3c7e44 100644 --- a/lam/templates/profedit/profilepage.php +++ b/lam/templates/profedit/profilepage.php @@ -47,6 +47,8 @@ startSecureSession(); // die if no write access if (!checkIfWriteAccessIsAllowed()) die(); +checkIfToolIsActive('toolProfileEditor'); + setlanguage(); // check if user is logged in, if not go to login