]> git.sur5r.net Git - bacula/bacula/commitdiff
baculum: Set default language if no language set
authorMarcin Haba <marcin.haba@bacula.pl>
Wed, 1 Nov 2017 17:10:03 +0000 (18:10 +0100)
committerMarcin Haba <marcin.haba@bacula.pl>
Wed, 1 Nov 2017 17:15:49 +0000 (18:15 +0100)
gui/baculum/protected/API/Pages/Panel/APIInstallWizard.php

index f178ba9624838781211724834d008d343236580b..09c5b689efa71e3fdf5d5427c4ce3287acd2c9ab 100644 (file)
@@ -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;