DeviceList: fix incorrect fstype

This commit is contained in:
bergware
2023-02-10 21:13:28 +01:00
parent 00dfc19c97
commit f66f313d15
+3 -3
View File
@@ -236,9 +236,9 @@ function array_online(&$disk, $fstype='') {
$echo[] = "<tr>";
switch ($disk['status']) {
case 'DISK_NP':
if (in_array($disk['name'],$pools) || $fstype = 'zfs') {
if (in_array($disk['name'],$pools) || $fstype=='zfs') {
$echo[] = "<td>".device_info($disk,true)."</td>";
$echo[] = "<td><a class='static'><i class='icon-disk icon'></i><span></span></a><em>".($fstype ? _('Not present') : _('Not installed'))."</em></td>";
$echo[] = "<td><a class='static'><i class='icon-disk icon'></i><span></span></a><em>".($fstype=='zfs' ? _('Not present') : _('Not installed'))."</em></td>";
$echo[] = "<td colspan='4'></td>";
$echo[] = fs_info($disk);
}
@@ -436,7 +436,7 @@ while (true) {
$echo[$n] .= "<tr class='tr_last'><td>"._('Slots').":</td><td colspan='8'>".cache_slots($off,$pool,$cache[$pool]['devicesSb'],$cache[$pool]['slots'])."</td><td></td></tr>";
} else {
foreach ($cache as $disk) if (prefix($disk['name'])==$pool) {
if (empty($fstype) && isset($disk['fsType'])) $fstype = str_replace('luks:','',$disk['fsType']);
if (isset($disk['fsType'])) $fstype = str_replace('luks:','',$disk['fsType']);
if (substr($cache[$pool]['fsStatus'],0,11)=='Unmountable' && empty($disk['fsStatus'])) $disk['fsStatus'] = $cache[$pool]['fsStatus'];
$echo[$n] .= array_online($disk,$fstype);
}