From 5d36c61f46dc0cbcc3daed5fa82161bae49b9f05 Mon Sep 17 00:00:00 2001 From: Marcin Haba Date: Sun, 6 Aug 2017 09:05:20 +0200 Subject: [PATCH] baculum: Fix bconsole test connection for new api host that works with new director --- gui/baculum/protected/Common/Portlets/NewHost.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gui/baculum/protected/Common/Portlets/NewHost.php b/gui/baculum/protected/Common/Portlets/NewHost.php index 29f75bda4f..cb8c6004b9 100644 --- a/gui/baculum/protected/Common/Portlets/NewHost.php +++ b/gui/baculum/protected/Common/Portlets/NewHost.php @@ -78,7 +78,18 @@ class NewHost extends PortletTemplate { // Console test $api->setHostParams($host, $host_params); + $director = null; + if (array_key_exists('director', $_SESSION)) { + // Current director can't be passed to new remote host. + $director = $_SESSION['director']; + unset($_SESSION['director']); + } + $console = $api->set(array('console'), array('version'), $host, false); + if (!is_null($director)) { + // Revert director setting if any + $_SESSION['director'] = $director; + } // Config test $api->setHostParams($host, $host_params); -- 2.39.5