fix: don't return template for containers not managed by dockerman

This commit is contained in:
mtongnz
2024-01-12 15:51:04 +13:00
parent 064cac1110
commit 3dda97319d

View File

@@ -338,8 +338,12 @@ class DockerTemplates {
$tmp['updated'] = var_export($DockerUpdate->getUpdateStatus($image),true);
}
if (!$com) $tmp['updated'] = 'undef';
if (empty($tmp['template']) || $reload) $tmp['template'] = $this->getUserTemplate($name);
if ($reload) $DockerUpdate->updateUserTemplate($name);
if ($ct['Manager'] !== 'dockerman')
$tmp['template'] = null;
else if (empty($tmp['template']) || $reload) {
$tmp['template'] = $this->getUserTemplate($name);
if ($reload) $DockerUpdate->updateUserTemplate($name);
}
//$this->debug("\n$name");
//foreach ($tmp as $c => $d) $this->debug(sprintf(' %-10s: %s', $c, $d));
}