deprecated php methods

This commit is contained in:
Tony Landis
2009-03-25 22:10:40 -06:00
parent d1547673dc
commit 1225cb10c0
12 changed files with 22 additions and 22 deletions

View File

@@ -187,14 +187,14 @@ class CORE_session
$server = getallheaders();
$domain = $server['Host'];
}
$domain = '.'.eregi_replace('^www.', '', $domain);
$domain = '.'.preg_replace('/^www./', '', $domain);
}
if(COOKIE_EXPIRE == 0 )
$cookie_expire = (time() + 86400*365);
else
$cookie_expire = (time() + (COOKIE_EXPIRE*60));
if(empty($domain) || eregi('localhost', $domain))
if(empty($domain) || preg_match('/localhost/', $domain))
setcookie(COOKIE_NAME,$this->id,$cookie_expire,'/');
else
setcookie(COOKIE_NAME,$this->id,$cookie_expire,'/', $domain);