diff --git a/includes/pdf/pdf_invoice_overview.inc.php b/includes/pdf/pdf_invoice_overview.inc.php index 3ce65a09..9982d801 100644 --- a/includes/pdf/pdf_invoice_overview.inc.php +++ b/includes/pdf/pdf_invoice_overview.inc.php @@ -233,9 +233,9 @@ class pdf_invoice_overview extends pdf_invoice_base # Draw attributes if they are present if (strlen($line['attr'])) { - $atrs = split("\r\n", str_replace('\r\n',"\r\n",$line['attr'])); + $atrs = preg_split("/\r\n/", str_replace('\r\n',"\r\n",$line['attr'])); foreach ($atrs as $a) { - $parts = split("==", $a); + $parts = preg_split("/==/", $a); switch ($parts[0]) { default: if(strlen($parts[0])) diff --git a/includes/pdf/pdf_invoice_voip-detailed.inc.php b/includes/pdf/pdf_invoice_voip-detailed.inc.php index 625e1caa..ce3c7ac4 100644 --- a/includes/pdf/pdf_invoice_voip-detailed.inc.php +++ b/includes/pdf/pdf_invoice_voip-detailed.inc.php @@ -276,9 +276,9 @@ class pdf_invoice_overview extends pdf_invoice_base $val = $line['name']; if (strlen($line['attr'])) { $val = ""; - $atrs = split("\r\n", str_replace('\r\n',"\r\n",$line['attr'])); + $atrs = preg_split("/\r\n/", str_replace('\r\n',"\r\n",$line['attr'])); foreach ($atrs as $a) { - $parts = split("==", $a); + $parts = preg_split("/==/", $a); switch ($parts[0]) { case "Destination": $this->SetX(69); diff --git a/includes/pdf/pdf_invoice_voip.inc.php b/includes/pdf/pdf_invoice_voip.inc.php index a6d730ec..be1b90a7 100644 --- a/includes/pdf/pdf_invoice_voip.inc.php +++ b/includes/pdf/pdf_invoice_voip.inc.php @@ -204,9 +204,9 @@ class pdf_invoice_overview extends pdf_invoice_base $val = $line['name']; if (strlen($line['attr'])) { $val = ""; - $atrs = split("\r\n", str_replace('\r\n',"\r\n",$line['attr'])); + $atrs = preg_split("/\r\n/", str_replace('\r\n',"\r\n",$line['attr'])); foreach ($atrs as $a) { - $parts = split("==", $a); + $parts = preg_split("/==/", $a); switch ($parts[0]) { case "Destination": $this->SetX(75); @@ -229,9 +229,9 @@ class pdf_invoice_overview extends pdf_invoice_base case "parent_service_id": $sql = sqlSelect($db,"service","prod_attr","id=::".$parts[1]."::"); $rstmp = $db->Execute($sql); - $atrs2 = split("\r\n", $rstmp->fields['prod_attr']); + $atrs2 = preg_split("/\r\n/", $rstmp->fields['prod_attr']); foreach ($atrs2 as $a2) { - $parts2 = split("==", $a2); + $parts2 = preg_split("/==/", $a2); switch ($parts2[0]) { case "station": case "ported": diff --git a/install/install_db_core.inc b/install/install_db_core.inc index bbdde61e..9a17dac3 100644 --- a/install/install_db_core.inc +++ b/install/install_db_core.inc @@ -158,7 +158,7 @@ class install_db if(ereg('[(]',$t_s)) { - $ts = split('[(]',$t_s); + $ts = preg_split('/[(]/',$t_s); $type = $ts[0]; $size = ereg_replace('[)]', '', $ts[1]); $flds[] = Array($field, $type, $size); @@ -423,7 +423,7 @@ class install_db if(ereg('[(]',$t_s)) { - $ts = split('[(]',$t_s); + $ts = preg_split('/[(]/',$t_s); $type = $ts[0]; $size = ereg_replace('[)]', '', $ts[1]); $flds[] = Array($field, $type, $size); diff --git a/modules/account/account.inc.php b/modules/account/account.inc.php index 872defe1..6fba0079 100644 --- a/modules/account/account.inc.php +++ b/modules/account/account.inc.php @@ -212,7 +212,7 @@ class account #################################################################### $type = 'add'; - $this->method["$type"] = split(",", $this->method["$type"]); + $this->method["$type"] = preg_split("/,/", $this->method["$type"]); $arr = $this->method["$type"]; include_once(PATH_CORE . 'validate.inc.php'); $validate = new CORE_validate; @@ -644,7 +644,7 @@ class account ### Retrieve the record: $type = "view"; - $this->method["$type"] = split(",", $this->method["$type"]); + $this->method["$type"] = explode(",", $this->method["$type"]); $db = new CORE_database; $db->view($VAR, $this, $type); @@ -843,7 +843,7 @@ class account ### Update the record $this->account_construct(); $type = "update"; - $this->method["$type"] = split(",", $this->method["$type"]); + $this->method["$type"] = explode(",", $this->method["$type"]); $db = new CORE_database; $db->update($VAR, $this, $type); diff --git a/modules/core/database_view.inc.php b/modules/core/database_view.inc.php index 07cc903c..3927deeb 100644 --- a/modules/core/database_view.inc.php +++ b/modules/core/database_view.inc.php @@ -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; $iid,$cookie_expire,'/'); else setcookie(COOKIE_NAME,$this->id,$cookie_expire,'/', $domain); diff --git a/modules/core/trigger.inc.php b/modules/core/trigger.inc.php index 385802be..0777da2c 100644 --- a/modules/core/trigger.inc.php +++ b/modules/core/trigger.inc.php @@ -40,12 +40,12 @@ class CORE_trigger function run_triggers($trigger) { global $C_method; - $triggers = split(',', $trigger); + $triggers = explode(',', $trigger); for($i=0; $i 1) { diff --git a/modules/core/xml.inc.php b/modules/core/xml.inc.php index f3d2eb33..fe3086b1 100644 --- a/modules/core/xml.inc.php +++ b/modules/core/xml.inc.php @@ -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; diff --git a/modules/setup/setup.inc.php b/modules/setup/setup.inc.php index 9310cda0..03edd953 100644 --- a/modules/setup/setup.inc.php +++ b/modules/setup/setup.inc.php @@ -75,7 +75,7 @@ class setup function view($VAR) { $type = "view"; - $this->method["$type"] = split(",", $this->method["$type"]); + $this->method["$type"] = explode(",", $this->method["$type"]); $db = new CORE_database; $db->view($VAR, $this, $type); } diff --git a/modules/setup/setup_construct.xml b/modules/setup/setup_construct.xml index df5321f5..c0e2abc7 100644 --- a/modules/setup/setup_construct.xml +++ b/modules/setup/setup_construct.xml @@ -95,7 +95,7 @@ C(16) - 0 + 1 X diff --git a/modules/setup/setup_install_data.xml b/modules/setup/setup_install_data.xml index 439f240d..57acb83f 100644 --- a/modules/setup/setup_install_data.xml +++ b/modules/setup/setup_install_data.xml @@ -27,7 +27,7 @@ 2 - 0 + 1 10 60 60