Display message and disable add share button if there are no mountable array disks.

This commit is contained in:
dlandon
2024-05-08 09:59:41 -05:00
parent dac9d237ee
commit 9a76f69f5d
3 changed files with 15 additions and 3 deletions

View File

@@ -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);