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

@@ -45,7 +45,7 @@ function CORE_database_view($VAR, &$construct, $type)
if(isset($VAR["id"]))
{
$id = split(',',$VAR["id"]);
$id = explode(',',$VAR["id"]);
for($i=0; $i<count($id); $i++)
{
if($id[$i] != '')

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);

View File

@@ -40,12 +40,12 @@ class CORE_trigger
function run_triggers($trigger)
{
global $C_method;
$triggers = split(',', $trigger);
$triggers = explode(',', $trigger);
for($i=0; $i<count($triggers); $i++)
{
if(isset($triggers[$i]))
{
$triggerss = split(':',$triggers[$i]);
$triggerss = explode(':',$triggers[$i]);
# added to remove php error: Undefined offset
if(isset($triggerss) && count($triggerss) > 1)
{

View File

@@ -65,7 +65,7 @@ class CORE_xml
// new XML to Array for PHP5 and SimpleXML
function SimpleXML2Array($xml) {
if (get_class($xml) == 'SimpleXMLElement') {
if (is_object($xml) && get_class($xml) == 'SimpleXMLElement') {
$attributes = $xml->attributes();
foreach($attributes as $k=>$v) {
if ($v) $a[$k] = (string) $v;