Removed redundant lib2/cookie.inc.php, changed all uses to new Cookie service. Except lib1 - should be phased out anyway.
This commit is contained in:
@ -192,16 +192,12 @@ function set_domain()
|
||||
|
||||
function set_language()
|
||||
{
|
||||
global $opt, $cookie;
|
||||
|
||||
if ($cookie === null) {
|
||||
$cookie = new cookie2();
|
||||
}
|
||||
global $opt;
|
||||
|
||||
if (isset($_REQUEST['locale']))
|
||||
$opt['template']['locale'] = strtoupper($_REQUEST['locale']);
|
||||
else
|
||||
$opt['template']['locale'] = strtoupper($cookie->get('locale', $opt['template']['default']['locale']));
|
||||
$opt['template']['locale'] = strtoupper($GLOBALS['container']->get('ocde.cookie')->get('locale', $opt['template']['default']['locale']));
|
||||
|
||||
if (isset($opt['template']['locale']) && $opt['template']['locale'] != '')
|
||||
{
|
||||
@ -215,7 +211,7 @@ function set_language()
|
||||
else
|
||||
$opt['template']['locale'] = $opt['template']['default']['locale'];
|
||||
|
||||
$cookie->set('locale', $opt['template']['locale'], $opt['template']['default']['locale']);
|
||||
$GLOBALS['container']->get('ocde.cookie')->set('locale', $opt['template']['locale'], $opt['template']['default']['locale']);
|
||||
|
||||
bindtextdomain('messages', $GLOBALS['container']->get('ocde.config')->getBaseDir() . '/cache2/translate');
|
||||
|
||||
@ -235,10 +231,9 @@ function set_language()
|
||||
|
||||
function set_usercountry()
|
||||
{
|
||||
global $cookie;
|
||||
|
||||
if (isset($_REQUEST['usercountry']))
|
||||
$cookie->set('usercountry', $_REQUEST['usercountry']);
|
||||
if (isset($_REQUEST['usercountry'])) {
|
||||
$GLOBALS['container']->get('ocde.cookie')->set('usercountry', $_REQUEST['usercountry']);
|
||||
}
|
||||
}
|
||||
|
||||
function set_timezone()
|
||||
|
Reference in New Issue
Block a user