Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

// Bug fix, no language is set when a employee is not logged yet

  • Loading branch information...
commit d1ee26895edeb8d6339e8962cab964a2c19f5a9c 1 parent 3b97989
Rémi Gaillard rGaillard authored gaillafr committed
Showing with 9 additions and 10 deletions.
  1. +9 −10 config/config.inc.php
19 config/config.inc.php
View
@@ -151,19 +151,18 @@
if ($employee->id_profile != _PS_ADMIN_PROFILE_)
Shop::cacheShops(true);
- $language = new Language($employee->id_lang);
- $context->language = $language;
$cookie->id_lang = (int)$employee->id_lang;
}
-else
-{
- /* if the language stored in the cookie is not available language, use default language */
- if (isset($cookie->id_lang) && $cookie->id_lang)
- $language = new Language($cookie->id_lang);
- if (!isset($language) || !Validate::isLoadedObject($language))
- $language = new Language(Configuration::get('PS_LANG_DEFAULT'));
- $context->language = $language;
+/* if the language stored in the cookie is not available language, use default language */
+if (isset($cookie->id_lang) && $cookie->id_lang)
+ $language = new Language($cookie->id_lang);
+if (!isset($language) || !Validate::isLoadedObject($language))
+ $language = new Language(Configuration::get('PS_LANG_DEFAULT'));
+$context->language = $language;
+
+if (!defined('_PS_ADMIN_DIR_'))
+{
if (isset($cookie->id_customer) && (int)$cookie->id_customer)
{
$customer = new Customer($cookie->id_customer);
Please sign in to comment.
Something went wrong with that request. Please try again.