Proxy fix and some traceability for DBH upgrade

This commit is contained in:
fbsanchez 2021-07-29 13:11:45 +02:00
parent cea9d2ae3d
commit 41f2842e41
2 changed files with 16 additions and 0 deletions

View File

@ -381,6 +381,20 @@ if ($PHPmemory_limit < $PHPmemory_limit_min && $PHPmemory_limit !== '-1') {
}
}
$proxy = null;
if (empty($config['update_manager_proxy_server']) === false
|| empty($config['update_manager_proxy_port']) === false
|| empty($config['update_manager_proxy_user']) === false
|| empty($config['update_manager_proxy_password']) === false
) {
$proxy = [
'server' => $config['update_manager_proxy_server'],
'port' => $config['update_manager_proxy_port'],
'user' => $config['update_manager_proxy_user'],
'password' => $config['update_manager_proxy_password'],
];
}
$ui = new Manager(
((is_array($config) === true) ? $pandora_url : 'http://'.$_SERVER['SERVER_ADDR'].'/'),
((is_array($config) === true) ? ui_get_full_url('ajax.php') : ''),
@ -400,6 +414,7 @@ $ui = new Manager(
'registration_code' => $puid,
'remote_config' => $remote_config,
'propagate_updates' => $is_metaconsole,
'proxy' => $proxy,
'set_maintenance_mode' => function () {
if (function_exists('config_update_value') === true) {
config_update_value('maintenance_mode', 1);

View File

@ -721,6 +721,7 @@ final class DBMaintainer
$umc->updateMR($path);
} catch (\Exception $e) {
// TODO: Send an event to notify errors.
$this->lastError = $e->getMessage();
$return = false;
}
} else {