Foren / Cotonti / Support / Bug in functions.php?

Mr G.
#30637 6. September 2011, 08:53

Hi, i'm not so good in php. but i thik i found a bug in function cot_langfile

there is in lines 2655-2658

elseif ($type == 'core')
	{
		return $cfg['lang_dir']."/$default/$name.$default.lang.php";
	}

so the language change doesn't work, i think there should be something like this

elseif ($type == 'core')
	{
		if (@file_exists($cfg['lang_dir']."/$lang/$name.$lang.lang.php"))
		{
			return $cfg['lang_dir']."/$lang/$name.$lang.lang.php";
		}
		else
		{
			return $cfg['lang_dir']."/$default/$name.$default.lang.php";
		}
	}

but i might be wrong...., as i said i'm not so good in php