add bloc network-proxy if not exist

This commit is contained in:
aynsix
2021-06-24 15:07:40 +03:00
parent 0e2a8a544a
commit c900908fa2

View File

@@ -4,7 +4,7 @@ use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Core\Configuration\PropertyAccess;
use Alchemy\Phrasea\WorkerManager\Queue\MessagePublisher;
class patch_414_PHRAS_3360 implements patchInterface
class patch_414PHRAS3360 implements patchInterface
{
/** @var string */
private $release = '4.1.4';
@@ -107,5 +107,27 @@ class patch_414_PHRAS_3360 implements patchInterface
if (!$conf->has(['workers', 'queue', 'worker-queue', 'ssl'])) {
$conf->set(['workers', 'queue', 'worker-queue', 'ssl'], false);
}
// add bloc network proxy if not yet exist
if (!$conf->has(['network-proxies'])) {
$proxies = [
'http-proxy' => [
'enabled' => false,
'host' => null,
'port' => null,
'user' => null,
'password' => null
],
'ftp-proxy' => [
'enabled' => false,
'host' => null,
'port' => null,
'user' => null,
'password' => null
]
];
$conf->set(['network-proxies'], $proxies);
}
}
}