mirror of
https://github.com/unraid/webgui.git
synced 2026-05-04 00:39:32 -05:00
Merge pull request #1924 from dlandon/situation_where_share_shows_array_when_not_on_the_array
Fix invalid situation where useCache is 'no' when array is enabled.
This commit is contained in:
@@ -56,6 +56,11 @@ if ((! $share['cachePool']) && ($share['cachePool2'])) {
|
||||
$share['cachePool2'] = "";
|
||||
}
|
||||
|
||||
/* If useCache is "no" with an array, this is invalid and useCache has to be 'only'. */
|
||||
if ((! $poolsOnly) && ($share['useCache'] == "no")) {
|
||||
$share['useCache'] = 'only';
|
||||
}
|
||||
|
||||
/* Check for non existent pool device. */
|
||||
if ($share['cachePool'] && !in_array($share['cachePool'], $pools)) {
|
||||
$poolDefined = false;
|
||||
|
||||
@@ -213,8 +213,8 @@ foreach ($shares as $name => $share) {
|
||||
$share_valid = true;
|
||||
}
|
||||
|
||||
/* When there is no array, all pools are treated as 'only' cache. */
|
||||
if (($poolsOnly) && (! $share['cachePool2'])) {
|
||||
/* When there is no array, all pools are treated as 'only' cache. If useCache is "no" with an array, this is invalid and useCache has to be 'only'. */
|
||||
if ((($poolsOnly) && (! $share['cachePool2'])) || ((! $poolsOnly) && ($share['useCache'] == "no"))) {
|
||||
$share['useCache'] = 'only';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user