diff --git a/emhttp/plugins/dynamix/ShareList.page b/emhttp/plugins/dynamix/ShareList.page index b97e27954..ce6d30037 100644 --- a/emhttp/plugins/dynamix/ShareList.page +++ b/emhttp/plugins/dynamix/ShareList.page @@ -16,23 +16,16 @@ Cond="_var($var,'fsState')!='Stopped' && _var($var,'shareUser')=='e'" */ ?> "._('There are no mountable array or pool disks - cannot add shares')."."; +$nodisks = ""._('There are no mounted array or pool disks - cannot add shares')."."; if (!checkDisks($disks)) die($nodisks); // No shared disks @@ -45,23 +45,18 @@ $nodisks = ""; +$nodisks = ""._('There are no mounted array or pool disks - cannot add shares')."."; if (!checkDisks($disks)) die($nodisks); // exit when no shares @@ -128,18 +128,13 @@ extract(parse_plugin_cfg('dynamix',true)); // Natural sorting of share names uksort($shares,'strnatcasecmp'); -/* Function to filter out unwanted disks, check if any valid disks exist, and ignore disks with a blank device. */ -function checkDisks($disks) { - global $pools; - +/* Function to test if any Mouned volumes exist. */ +function checkDisks(&$disks) { $rc = false; foreach ($disks as $disk) { - /* Check the disk type, fsStatus, and ensure the device is not blank. */ - if (!in_array($disk['name'], ['flash', 'parity', 'parity2']) && strpos($disk['fsStatus'], 'Unmountable') === false && !empty($disk['device'])) { - /* A valid disk with a non-blank device is found. */ + if ($disk['name']!=='flash' && _var($disk,'fsStatus',"")==='Mounted') { $rc = true; - break; } }