diff --git a/class2.php b/class2.php index 287977547..fc1c4406d 100644 --- a/class2.php +++ b/class2.php @@ -1912,6 +1912,11 @@ if(!isset($_E107['no_online']) && varset($pref['track_online'])) */ function cookie($name, $value, $expire=0, $path = e_HTTP, $domain = '', $secure = 0) { + if(!e_SUBDOMAIN || (defined('MULTILANG_SUBDOMAIN') && MULTILANG_SUBDOMAIN === TRUE)) + { + $domain = (e_DOMAIN != FALSE) ? ".".e_DOMAIN : ""; + } + setcookie($name, $value, $expire, $path, $domain, $secure); }