Shares set to 'prefer' when set up in an array will work when no array is configured.

This commit is contained in:
dlandon
2024-05-23 16:51:01 -05:00
parent 44e74e15d3
commit 7b568c2aa1

View File

@@ -182,10 +182,14 @@ foreach ($shares as $name => $share) {
/* Check if poolsOnly is true */
$array = $share['cachePool2'] ? ucfirst($share['cachePool2']) : "<i class='fa fa-database fa-fw'></i>"._('Array');
if ($poolsOnly) {
/* If useCache is set to 'yes', change it to 'only' */
if ((($share['useCache'] == 'yes') || ($share['useCache'] == 'prefer')) && (!$share['cachePool2'])) {
/* If useCache is set to 'yes', change it to 'no'. */
if (($share['useCache'] == 'yes') && (!$share['cachePool2'])) {
$share['useCache'] = 'no';
}
/* If useCache is set to 'yes', change it to 'prefer'. */
if (($share['useCache'] == 'prefer') && (!$share['cachePool2'])) {
$share['useCache'] = 'only';
}
}
$row++;