Index: branches/5.0.x/units/shipping_quote_engines/usps.php =================================================================== diff -u -r12924 -r13262 --- branches/5.0.x/units/shipping_quote_engines/usps.php (.../usps.php) (revision 12924) +++ branches/5.0.x/units/shipping_quote_engines/usps.php (.../usps.php) (revision 13262) @@ -1,6 +1,6 @@ 10 ) $res = substr($res, 0, 10); + $res = preg_replace('/[(]|[)]|[\-]|[ ]|[#]|[\.]|[a-z](.*)|[A-Z](.*)/g', '', $phone); + if ( strlen($res) > 10 ) { + $res = substr($res, 0, 10); + } return $res != '' ? $res : $phone; } Index: branches/5.0.x/units/gateways/gw_classes/ideal_nl.php =================================================================== diff -u -r12924 -r13262 --- branches/5.0.x/units/gateways/gw_classes/ideal_nl.php (.../ideal_nl.php) (revision 12924) +++ branches/5.0.x/units/gateways/gw_classes/ideal_nl.php (.../ideal_nl.php) (revision 13262) @@ -1,6 +1,6 @@ Application->GetVar('ideal_nl_bank_id'); $fields['description'] = 'Invoice #'.$item_data['OrderNumber']; Index: branches/5.0.x/units/products/products_event_handler.php =================================================================== diff -u -r12924 -r13262 --- branches/5.0.x/units/products/products_event_handler.php (.../products_event_handler.php) (revision 12924) +++ branches/5.0.x/units/products/products_event_handler.php (.../products_event_handler.php) (revision 13262) @@ -1,6 +1,6 @@ Application->RecallVar('user_id'); $email_event = &$this->Application->EmailEventUser('PRODUCT.SUGGEST', $user_id, $send_params); $email_event = &$this->Application->EmailEventAdmin('PRODUCT.SUGGEST'); Index: branches/5.0.x/units/orders/orders_item.php =================================================================== diff -u -r13209 -r13262 --- branches/5.0.x/units/orders/orders_item.php (.../orders_item.php) (revision 13209) +++ branches/5.0.x/units/orders/orders_item.php (.../orders_item.php) (revision 13262) @@ -1,6 +1,6 @@ GetDBField($cardtype_field) ) { case 2: // MasterCard - $cc_valid = ereg("^5[1-5].{14}$", $value); + $cc_valid = preg_match('/^5[1-5].{14}$/', $value); break; case 1: // Visa - $cc_valid = ereg("^4.{15}$|^4.{12}$", $value); + $cc_valid = preg_match('/^4.{15}$|^4.{12}$/', $value); break; case 3: // American Express - $cc_valid = ereg("^3[47].{13}$", $value); + $cc_valid = preg_match('/^3[47].{13}$/', $value); break; case 4: // Discover - $cc_valid = ereg("^6011.{12}$", $value); + $cc_valid = preg_match('/^6011.{12}$/', $value); break; case 5: // Diners Club - $cc_valid = ereg("^30[0-5].{11}$|^3[68].{12}$", $value); + $cc_valid = preg_match('/^30[0-5].{11}$|^3[68].{12}$/', $value); break; case 6: // JBC - $cc_valid = ereg("^3.{15}$|^2131|1800.{11}$", $value); + $cc_valid = preg_match('/^3.{15}$|^2131|1800.{11}$/', $value); break; default: Index: branches/5.0.x/units/gateways/gw_classes/atosorigin.php =================================================================== diff -u -r12924 -r13262 --- branches/5.0.x/units/gateways/gw_classes/atosorigin.php (.../atosorigin.php) (revision 12924) +++ branches/5.0.x/units/gateways/gw_classes/atosorigin.php (.../atosorigin.php) (revision 13262) @@ -1,6 +1,6 @@ Application->BaseURL('/in-commerce/units/gateways/gw_classes/notify_scripts').'atosorigin_notify.php'; $txt_amount = sprintf("%.2f", $item_data['TotalAmount']); - $params['amount'] = eregi_replace("[.,]", '', $txt_amount); - $params['caddie'] = $this->Application->GetSID().','.MD5($item_data['OrderId']); + + $params['amount'] = str_replace( Array('.', ','), '', $txt_amount); + $params['caddie'] = $this->Application->GetSID() . ',' . MD5($item_data['OrderId']); $params['order_id'] = $item_data['OrderId']; $params['customer_ip_address'] = $_SERVER['REMOTE_ADDR']; $params['customer_id'] = $item_data['PortalUserId']; @@ -92,8 +93,8 @@ $ret = $rets[0]; - $ret = eregi_replace("^.*\!\!", '', $ret); - $ret = chop($ret, '!'); + $ret = preg_replace('/^(.*)!!/is', '', $ret); + $ret = rtrim($ret, '!'); return ''.$ret.'
'; } Index: branches/5.0.x/units/gateways/gw_classes/paybox.php =================================================================== diff -u -r12924 -r13262 --- branches/5.0.x/units/gateways/gw_classes/paybox.php (.../paybox.php) (revision 12924) +++ branches/5.0.x/units/gateways/gw_classes/paybox.php (.../paybox.php) (revision 13262) @@ -1,6 +1,6 @@ Application->HREF($tag_params['cancel_template'],'',Array('pass'=>'m')); $txt_amount = sprintf("%.2f", $item_data['TotalAmount']); - $params['PBX_TOTAL'] = eregi_replace("[.,]", '', $txt_amount); + $params['PBX_TOTAL'] = str_replace( Array('.', ','), '', $txt_amount); $params['PBX_CMD'] = $this->Application->GetSID().','.MD5($item_data['OrderId']); /*$params['order_id'] = $item_data['OrderId']; @@ -96,8 +96,8 @@ $ret = implode("\n", $rets); - $ret = eregi_replace("^.*\!\!", '', $ret); - $ret = chop($ret, '!'); + $ret = preg_replace('/^(.*)!!/is', '', $ret); + $ret = rtrim($ret, '!'); return '
'.$ret.'
'; }