Start migration after installation check (#2148)

This commit is contained in:
jekkos committed 2018-09-23 14:28:23 +02:00
1 parent 9f71427fee
commit a6b5726cdc
2 files changed
+8 -7

No files matched your search

+4 -4
View File
@@ -41,6 +41,10 @@ class Login extends CI_Controller
return FALSE;
}
// trigger any required upgrade before starting the application
$this->load->library('migration');
$this->migration->latest();
if(!$this->Employee->login($username, $password))
{
$this->form_validation->set_message('login_check', $this->lang->line('login_invalid_username_and_password'));
@@ -48,10 +52,6 @@ class Login extends CI_Controller
return FALSE;
}
// trigger any required upgrade before starting the application
$this->load->library('migration');
$this->migration->latest();
return TRUE;
}
+4 -3
View File
@@ -11,10 +11,11 @@ function current_language_code($load_system_language = FALSE)
// Returns the language code of the employee if set or system language code if not
if($employee->is_logged_in() && $load_system_language != TRUE)
{
$employee_language_code = $employee->get_logged_in_employee_info()->language_code;
if($employee_language_code != NULL && $employee_language_code != '')
$employee_info = $employee->get_logged_in_employee_info();
if(property_exists($employee_info, 'language_code') && !empty($employee_info->language_code))
{
return $employee_language_code;
return $employee_info->language_code;
}
}