Merge pull request #1720 from dlandon/master

Disable "Add Share" button when there are no mountable array disks; disable Reiserfs selections; add multi line NFS Rule.
This commit is contained in:
tom mortensen
2024-05-11 21:20:56 -07:00
committed by GitHub
7 changed files with 156 additions and 59 deletions
+5 -2
View File
@@ -28,10 +28,13 @@ $var = parse_ini_file('state/var.ini');
$sec = parse_ini_file('state/sec.ini',true);
$sec_nfs = parse_ini_file('state/sec_nfs.ini',true);
// exit when no disks
$nodisks = "<tr><td class='empty' colspan='7'><i class='fa fa-folder-open-o icon'></i>"._('There are no exportable disk shares')."</td></tr>";
// exit when no mountable array disks
$nodisks = "<tr><td class='empty' colspan='7'><strong>"._('There are no mountable array or pool disks - cannot add shares').".</strong></td></tr>";
if (!$disks) die($nodisks);
// No shared disks
$nodisks = "<tr><td class='empty' colspan='7'><i class='fa fa-folder-open-o icon'></i>"._('There are no exportable disk shares')."</td></tr>";
// GUI settings
extract(parse_plugin_cfg('dynamix',true));
@@ -46,6 +46,10 @@ $var = parse_ini_file('state/var.ini');
$sec = parse_ini_file('state/sec.ini',true);
$sec_nfs = parse_ini_file('state/sec_nfs.ini',true);
// exit when no mountable array disks
$nodisks = "<tr><td class='empty' colspan='7'><strong>"._('There are no mountable array or pool disks - cannot add shares').".</strong></td></tr>";
if (!$disks) die($nodisks);
// exit when no shares
$noshares = "<tr><td class='empty' colspan='7'><i class='fa fa-folder-open-o icon'></i>"._('There are no exportable user shares')."</td></tr>";
if (!$shares) die($noshares);
@@ -29,8 +29,7 @@ if (isset($_POST['#apply'])) {
$dotm = $_POST['dotm'] ?? '*';
$month = $_POST['month'] ?? '*';
$day = $_POST['day'] ?? '*';
$write = $_POST['write'] ?? '';
$write = ($write == "yes") ? "" : "NOCORRECT";
$write = $_POST['write'] ?? 'NOCORRECT';
$term = $test = $end1 = $end2 = '';
switch ($dotm) {
case '28-31':