From 156599031a82abe8b2816b3758eb50189265b03e Mon Sep 17 00:00:00 2001 From: dlandon Date: Fri, 30 Aug 2024 07:25:33 -0500 Subject: [PATCH] Fix condition where useCache is 'no' when there is no array. --- emhttp/plugins/dynamix/include/ShareList.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/emhttp/plugins/dynamix/include/ShareList.php b/emhttp/plugins/dynamix/include/ShareList.php index a2c239563..20b64fb85 100644 --- a/emhttp/plugins/dynamix/include/ShareList.php +++ b/emhttp/plugins/dynamix/include/ShareList.php @@ -214,12 +214,9 @@ foreach ($shares as $name => $share) { $share_valid = true; } - /* Check if poolsOnly is true. */ - if ($poolsOnly) { - /* If useCache is set to 'yes' or 'prefer', change it to 'only'. */ - if ((($share['useCache'] == 'yes') || ($share['useCache'] == 'prefer')) && (!$share['cachePool2'])) { - $share['useCache'] = 'only'; - } + /* When there is no array, all pools are treated as 'only' cache. */ + if (($poolsOnly) && (! $share['cachePool2'])) { + $share['useCache'] = 'only'; } $row++;