mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-07-12 16:07:26 -04:00
Simplified business logic
This commit is contained in:
committed by
Steve Ireland
parent
7b7de41ffc
commit
29997d9083
@@ -13,12 +13,12 @@ define('DEFAULT_DATETIME', mktime(0, 0, 0, 1, 1, 2010));
|
||||
/**
|
||||
* Currency locale helper
|
||||
*/
|
||||
function current_language_code(bool $load_system_language = FALSE): string
|
||||
function current_language_code(bool $load_system_language = false): string
|
||||
{
|
||||
$employee = model(Employee::class);
|
||||
|
||||
// Returns the language code of the employee if set or system language code if not
|
||||
if($employee->is_logged_in() && $load_system_language != TRUE) //TODO: !==
|
||||
if($employee->is_logged_in() && $load_system_language === false)
|
||||
{
|
||||
$employee_info = $employee->get_logged_in_employee_info();
|
||||
|
||||
|
||||
@@ -39,15 +39,9 @@ class MailchimpConnector
|
||||
{
|
||||
$encrypter = Services::encrypter();
|
||||
|
||||
if(empty($api_key))
|
||||
{
|
||||
$stored_key = config('OSPOS')->settings['mailchimp_api_key'];
|
||||
$this->_api_key = $encrypter->decrypt($stored_key); //TODO: Hungarian notation
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_api_key = $api_key; //TODO: Hungarian notation
|
||||
}
|
||||
$this->_api_key = empty($api_key)
|
||||
? $encrypter->decrypt(config('OSPOS')->settings['mailchimp_api_key']) //TODO: Hungarian notation
|
||||
: $api_key; //TODO: Hungarian notation
|
||||
|
||||
if(!empty($this->_api_key)) //TODO: Hungarian notation
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user