Move name of the localization cookie into a variable

This commit is contained in:
Fedor A. Fetisov 2013-10-28 13:10:12 +04:00
parent 5cb3a50642
commit d73922358f

View File

@ -18,6 +18,8 @@
require_once(dirname(__FILE__) . '/converter.php'); require_once(dirname(__FILE__) . '/converter.php');
require_once(dirname(__FILE__) . '/verification.php'); require_once(dirname(__FILE__) . '/verification.php');
$locale_cookie_name = 'mibew_locale';
function myiconv($in_enc, $out_enc, $string) function myiconv($in_enc, $out_enc, $string)
{ {
global $_utf8win1251, $_win1251utf8; global $_utf8win1251, $_win1251utf8;
@ -62,7 +64,7 @@ function get_available_locales()
function get_user_locale() function get_user_locale()
{ {
global $default_locale; global $default_locale, $locale_cookie_name;
if (isset($_COOKIE['mibew_locale'])) { if (isset($_COOKIE['mibew_locale'])) {
$requested_lang = $_COOKIE['mibew_locale']; $requested_lang = $_COOKIE['mibew_locale'];