mirror of
https://github.com/unraid/webgui.git
synced 2026-01-25 11:09:03 -06:00
Hide Format button when wrong encryption key is ignored
This commit is contained in:
21
plugins/dynamix/include/HideFormatButton.php
Normal file
21
plugins/dynamix/include/HideFormatButton.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?PHP
|
||||
/* Copyright 2005-2017, Lime Technology
|
||||
* Copyright 2012-2017, Bergware International.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2,
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
$hide = '/var/tmp/hide_format_button.tmp';
|
||||
$flag = file_exists($hide);
|
||||
|
||||
switch ($_POST['hide']) {
|
||||
case 'yes': if (!$flag) touch($hide); break;
|
||||
case 'no' : if ($flag) unlink($hide); break;
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user