From: Marcin Haba Date: Wed, 1 Nov 2017 17:10:03 +0000 (+0100) Subject: baculum: Set default language if no language set X-Git-Tag: Release-9.0.5~7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9de01366005f64dcfa5b07259b1595b682dfa99a;p=bacula%2Fbacula baculum: Set default language if no language set --- diff --git a/gui/baculum/protected/API/Pages/Panel/APIInstallWizard.php b/gui/baculum/protected/API/Pages/Panel/APIInstallWizard.php index f178ba9624..09c5b689ef 100644 --- a/gui/baculum/protected/API/Pages/Panel/APIInstallWizard.php +++ b/gui/baculum/protected/API/Pages/Panel/APIInstallWizard.php @@ -29,6 +29,7 @@ Prado::using('System.Web.UI.ActiveControls.TActiveButton'); Prado::using('System.Web.UI.ActiveControls.TActiveRadioButton'); Prado::using('System.Web.UI.ActiveControls.TActiveCustomValidator'); Prado::using('Application.Common.Class.OAuth2'); +Prado::using('Application.API.Class.APIConfig'); Prado::using('Application.API.Class.BException'); Prado::using('Application.API.Class.BaculumAPIPage'); Prado::using('Application.API.Class.Database'); @@ -172,7 +173,7 @@ class APIInstallWizard extends BaculumAPIPage { $cfg_data['api']['client_id'] = $this->APIOAuth2ClientId->Text; } $cfg_data['api']['debug'] = isset($this->config['api']['debug']) ? $this->config['api']['debug'] : "0"; - $cfg_data['api']['lang'] = $_SESSION['language']; + $cfg_data['api']['lang'] = isset($_SESSION['language']) ? $_SESSION['language'] : APIConfig::DEFAULT_LANGUAGE; $cfg_data['db']['enabled'] = (integer)($this->DatabaseYes->Checked === true); $cfg_data['db']['type'] = $this->DBType->SelectedValue; $cfg_data['db']['name'] = $this->DBName->Text;