Merge remote-tracking branch 'upstream/master'

This commit is contained in:
bergware
2025-01-01 10:18:21 +01:00
8 changed files with 59 additions and 49 deletions
@@ -156,7 +156,7 @@ if ($_POST['vms']) {
if (!isset($domain_cfg["CONSOLE"])) $vmrcconsole = "web"; else $vmrcconsole = $domain_cfg["CONSOLE"];
if (!isset($domain_cfg["RDPOPT"])) $vmrcconsole .= ";no"; else $vmrcconsole .= ";".$domain_cfg["RDPOPT"];
$WebUI = html_entity_decode($arrConfig["template"]["webui"]);
$menu = sprintf("onclick=\"addVMContext('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')\"", htmlentities($log,ENT_QUOTES), addslashes($uuid), addslashes($template), $state, addslashes($vmrcurl), strtoupper($vmrcprotocol), htmlentities($log,ENT_QUOTES),addslashes($fstype), $vmrcconsole,false,addslashes(str_replace('"',"'",$WebUI)));
$menu = sprintf("onclick=\"addVMContext('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')\"", htmlentities($vm,ENT_QUOTES), addslashes($uuid), addslashes($template), $state, addslashes($vmrcurl), strtoupper($vmrcprotocol), htmlentities($log,ENT_QUOTES),addslashes($fstype), $vmrcconsole,false,addslashes(str_replace('"',"'",$WebUI)));
$icon = $lv->domain_get_icon_url($res);
switch ($state) {
case 'running':
+12 -2
View File
@@ -187,7 +187,17 @@ define('LUKS_STATUS_UNENCRYPTED', 2);
// Build table
$row = 0;
/* Get the first pool if needed. */
$firstPool = $pools_check[0] ?? "";
foreach ($shares as $name => $share) {
/* Correct a situation in previous Unraid versions where an array only share has a useCache defined. */
if ((!$poolsOnly) && ($share['useCache'] == "no")) {
$share['cachePool'] = "";
} else if (($poolsOnly) && (!$share['cachePool'])) {
$share['cachePool'] = $firstPool;
}
/* Is cachePool2 defined? If it is we need to show the cache pool 2 device name instead of 'Array'. */
if ($share['cachePool2']) {
$array = compress(my_disk($share['cachePool2'],$display['raw']));
@@ -214,8 +224,8 @@ foreach ($shares as $name => $share) {
$share_valid = true;
}
/* 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['cachePool']) && ($share['useCache'] == "no"))) {
/* When there is no array, all pools are treated as 'only' cache. */
if (($poolsOnly) && (! $share['cachePool2'])) {
$share['useCache'] = 'only';
}