allow to hide all tools
This commit is contained in:
		
							parent
							
								
									1d8988114b
								
							
						
					
					
						commit
						78e54bb324
					
				|  | @ -697,7 +697,8 @@ class lamList { | |||
| 				echo "<button id=\"delButton\" name=\"del\">" . $this->labels['deleteEntry'] . "</button>\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 "<button id=\"fileUploadButton\" name=\"fileUpload\">" . _('File upload') . "</button>\n"; | ||||
| 			} | ||||
|  |  | |||
|  | @ -123,7 +123,7 @@ class toolFileUpload implements LAMTool { | |||
| 	 * @return boolean hideable | ||||
| 	 */ | ||||
| 	function isHideable() { | ||||
| 		return false; | ||||
| 		return true; | ||||
| 	} | ||||
| 	 | ||||
| } | ||||
|  |  | |||
|  | @ -123,7 +123,7 @@ class toolPDFEditor implements LAMTool { | |||
| 	 * @return boolean hideable | ||||
| 	 */ | ||||
| 	function isHideable() { | ||||
| 		return false; | ||||
| 		return true; | ||||
| 	} | ||||
| 	 | ||||
| } | ||||
|  |  | |||
|  | @ -123,7 +123,7 @@ class toolProfileEditor implements LAMTool { | |||
| 	 * @return boolean hideable | ||||
| 	 */ | ||||
| 	function isHideable() { | ||||
| 		return false; | ||||
| 		return true; | ||||
| 	} | ||||
| 	 | ||||
| } | ||||
|  |  | |||
|  | @ -249,8 +249,11 @@ class lamDHCPList extends lamList { | |||
| 			if (!$createOnly) { | ||||
| 				echo ("<button id=\"delButton\" name=\"del\">" . $this->labels['deleteEntry'] . "</button>\n"); | ||||
| 			} | ||||
| 			$toolSettings = $_SESSION['config']->getToolSettings(); | ||||
| 			if (!(isset($toolSettings['tool_hide_toolFileUpload']) && ($toolSettings['tool_hide_toolFileUpload'] == 'true'))) { | ||||
| 				echo '      '; | ||||
| 				echo "<button id=\"fileUploadButton\" name=\"fileUpload\">" . _('File upload') . "</button>\n"; | ||||
| 			} | ||||
| 			echo '      '; | ||||
| 			echo ("<button id=\"dhcpDefaultsButton\" name=\"dhcpDefaults\">" . $this->labels['dhcpDefaults'] . "</button>\n"); | ||||
| 			echo "   "; | ||||
|  |  | |||
|  | @ -131,6 +131,7 @@ foreach ($toSort as $key => $value) { | |||
| 		</li> | ||||
| 		<?php | ||||
| 		} | ||||
| 		if (sizeof($tools) > 0) { | ||||
| 		?>
 | ||||
| 		<li> | ||||
| 			<a href="<?php echo $headerPrefix; ?>tools.php"><img height="16" width="16" alt="tools" src="<?php echo $headerPrefix; ?>../graphics/tools.png"> <?php echo _("Tools") ?></a>
 | ||||
|  | @ -160,6 +161,7 @@ foreach ($toSort as $key => $value) { | |||
| 			</ul> | ||||
| 		</li> | ||||
| 		<?php | ||||
| 		} | ||||
| 		if ($_SESSION['config']->get_Suffix('tree') != "") { | ||||
| 		?>
 | ||||
| 	    <li> | ||||
|  |  | |||
|  | @ -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(); | ||||
| 
 | ||||
|  |  | |||
|  | @ -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(); | ||||
| 
 | ||||
|  |  | |||
|  | @ -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(); | ||||
| 
 | ||||
|  |  | |||
|  | @ -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
 | ||||
|  |  | |||
|  | @ -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
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue