Out with split(), in with explode()

This commit is contained in:
Tony Landis
2009-03-27 23:20:19 -06:00
parent 019a526aab
commit da32369c07
101 changed files with 639 additions and 639 deletions

View File

@@ -85,10 +85,10 @@ class plg_chout_NETBILLING extends base_checkout_plugin
$ret['status'] = 1;
} elseif (eregi("RET_STATUS=0",$response)) {
$ret['status'] = 0;
$mydata = split("\&",$response);
$mydata = explode("\&",$response);
foreach($mydata as $key=>$value)
{
$newdata = split('=', $value);
$newdata = explode('=', $value);
$ret[$newdata[0]] = $newdata[1];
}
$reason = urldecode($ret['RET_AUTH_MSG']);

View File

@@ -118,8 +118,8 @@ class plg_chout_SWREG_ADVANCED extends base_checkout_plugin
echo '<script language=Javascript>alert(\'SSL Failed!\') </script>';
return false;
} else {
foreach(split("&",$response) as $pair) {
list($key,$val)=split("=",$pair);
foreach(explode("&",$response) as $pair) {
list($key,$val)=explode("=",$pair);
$swreg[$key]=$val;
}
}

View File

@@ -90,13 +90,13 @@ class plg_chout_TRUSTCOMMERCE extends base_checkout_plugin
echo '<script language=Javascript>alert(\'SSL Failed!\') </script>';
return false;
} else {
$response = split("\n", trim($return));
$response = explode("\n", trim($return));
for($i=0; $i<count($response); $i++)
{
if(!empty($response[$i]))
{
unset($thisone);
$thisone = split("=", $response[$i]);
$thisone = explode("=", $response[$i]);
$varr[$thisone[0]] = $thisone[1];
}
}

View File

@@ -469,7 +469,7 @@ class umTransaction {
}
// result will be on the last line of the return
$tmp=split("\n",$result);
$tmp=explode("\n",$result);
$result=$tmp[count($tmp)-1];
// result is in urlencoded format, parse into an array

View File

@@ -976,7 +976,7 @@ class import_plugin extends import
$term = $rs->fields['domain_years'];
$domain_name = strtolower($rs->fields['domain_name']);
$arr = split('\.', $domain_name);
$arr = explode('\.', $domain_name);
$tld = '';
$domain = $arr[0];
for($i=0; $i<count($arr); $i++) {

View File

@@ -256,8 +256,8 @@ class import_plugin extends import
# Get a local account_billing id
$bill_id = $db->GenID($p.'account_billing_id');
$type = split("-", $rs->fields['billing_cc_type']);
$exp = split("/", $rs->fields['billing_cc_exp']);
$type = explode("-", $rs->fields['billing_cc_type']);
$exp = explode("/", $rs->fields['billing_cc_exp']);
# the modernbill encryption method is unknown, so we have no way to decrypt the cc details
# we will create a blank CC record that the user or admin can manually update...
@@ -1013,7 +1013,7 @@ class import_plugin extends import
# Determine the domain TLD & Name:
$domain_name = $rs->fields['domain_name'];
$arr = split('\.', $domain_name);
$arr = explode('\.', $domain_name);
$tld = '';
$domain = $arr[0];
for($i=0; $i<count($arr); $i++) {
@@ -1216,7 +1216,7 @@ class import_plugin extends import
# Determine the domain TLD & Name:
$domain_name = $rs->fields['target'];
$arr = split('\.', $domain_name);
$arr = explode('\.', $domain_name);
$tld = '';
$domain = $arr[0];
for($i=0; $i<count($arr); $i++) {

View File

@@ -814,7 +814,7 @@ class import_plugin extends import
# Determine the domain TLD & Name:
$domain_name = $rs->fields['domain'];
$arr = split('\.', $domain_name);
$arr = explode('\.', $domain_name);
$tld = '';
$domain = $arr[0];
for($i=0; $i<count($arr); $i++) {
@@ -1066,7 +1066,7 @@ class import_plugin extends import
# Determine the domain TLD & Name:
$domain_name = $rs->fields['target'];
$arr = split('\.', $domain_name);
$arr = explode('\.', $domain_name);
$tld = '';
$domain = $arr[0];
for($i=0; $i<count($arr); $i++) {

View File

@@ -388,7 +388,7 @@ function mail_co_uk($account,$domain) {
$name = trim($name);
$fullname = split(" ",$name);
$fullname = explode(" ",$name);
$count = count($fullname) - 1;
$l_name = $fullname[$count];
$f_name = $fullname[0];
@@ -540,7 +540,7 @@ function mail_c_n_o($account,$domain) {
$name = trim($name);
$fullname = split(" ",$name);
$fullname = explode(" ",$name);
$count = count($fullname) - 1;
$l_name = $fullname[$count];
$f_name = $fullname[0];
@@ -677,7 +677,7 @@ function mail_info_biz($account,$domain) {
$country = $dbc->f("country_2_code");
$name = trim($name);
$fullname = split(" ",$name);
$fullname = explode(" ",$name);
$count = count($fullname) - 1;
$l_name = $fullname[$count];
$f_name = $fullname[0];
@@ -859,7 +859,7 @@ function mail_name($account,$domain) {
$name = trim($name);
$fullname = split(" ",$name);
$fullname = explode(" ",$name);
$count = count($fullname) - 1;
$l_name = $fullname[$count];
$f_name = $fullname[0];
@@ -1029,7 +1029,7 @@ function mail_us($account,$domain) {
$name = trim($name);
$fullname = split(" ",$name);
$fullname = explode(" ",$name);
$count = count($fullname) - 1;
$l_name = $fullname[$count];
$f_name = $fullname[0];

View File

@@ -243,10 +243,10 @@ class plgn_voip_did_DIDX
global $C_debug;
$C_debug->error('DIDX.php', 'refresh', 'Could not acquire information from DIDx.org');
} else {
$entries = split("\r\n", $this->country_area);
$entries = explode("\r\n", $this->country_area);
foreach ($entries as $entry) {
$eparts = split(":", $entry);
$areas = split(",", $eparts[1]);
$eparts = explode(":", $entry);
$areas = explode(",", $eparts[1]);
$bDelete = true;
foreach ($areas as $area) {
$params = array(

View File

@@ -155,10 +155,10 @@ class plgn_voip_did_MAGRATHEA
$voip = new voip;
$db =& DB();
$entries = split("\r\n", $this->country_area);
$entries = explode("\r\n", $this->country_area);
foreach ($entries as $entry) {
$eparts = split(":", $entry);
$areas = split(",", $eparts[1]);
$eparts = explode(":", $entry);
$areas = explode(",", $eparts[1]);
$bDelete = false;
foreach ($areas as $area) {