company_path() helper used.
[fa-stable.git] / includes / lang / language.php
index 824a528ca7ee2da58d35a6aef0c6c13f656064a6..0b8ba215021c68587c14f33a58c96e33e90db989 100644 (file)
@@ -47,7 +47,7 @@ class language
 
        function set_language($code) 
        {
-           global $comp_path, $path_to_root, $installed_languages;
+           global $path_to_root, $installed_languages;
 
                $changed = $this->code != $code;
                $lang = array_search_value($code, $installed_languages, 'code');
@@ -55,7 +55,7 @@ class language
                if ($lang && $changed)
                {
                // flush cache as we can use several languages in one account
-                       flush_dir($comp_path.'/'.user_company().'/js_cache');
+                       flush_dir(company_path().'/js_cache');
 
                        $this->name = $lang['name'];
                        $this->code = $lang['code'];