Index: branches/5.2.x/units/downloads/download_helper.php =================================================================== diff -u -N -r15172 -r15568 --- branches/5.2.x/units/downloads/download_helper.php (.../download_helper.php) (revision 15172) +++ branches/5.2.x/units/downloads/download_helper.php (.../download_helper.php) (revision 15568) @@ -1,6 +1,6 @@ SetDBField('ProductName', $product_object->GetField('Name')); $down_object->SetDBField('FileId', $file_info['FileId']); $down_object->SetDBField('Filename', $file_info['FilePath']); - $down_object->SetDBField('IPAddress', $_SERVER['REMOTE_ADDR']); + $down_object->SetDBField('IPAddress', $this->Application->getClientIp()); $down_object->SetDBField('StartedOn_date', $file_info['download_start']); $down_object->SetDBField('StartedOn_time', $file_info['download_start']); Index: branches/5.2.x/units/shipping_quote_engines/usps.php =================================================================== diff -u -N -r15141 -r15568 --- branches/5.2.x/units/shipping_quote_engines/usps.php (.../usps.php) (revision 15141) +++ branches/5.2.x/units/shipping_quote_engines/usps.php (.../usps.php) (revision 15568) @@ -1,6 +1,6 @@ Application->getClientIp(), $usps_server . '/' . $api_dll . '?' . urldecode($request), $body ); Index: branches/5.2.x/units/orders/orders_event_handler.php =================================================================== diff -u -N -r15540 -r15568 --- branches/5.2.x/units/orders/orders_event_handler.php (.../orders_event_handler.php) (revision 15540) +++ branches/5.2.x/units/orders/orders_event_handler.php (.../orders_event_handler.php) (revision 15568) @@ -1,6 +1,6 @@ setNextOrderNumber($event); - $object->SetDBField('OrderIP', $_SERVER['REMOTE_ADDR']); + $object->SetDBField('OrderIP', $this->Application->getClientIp()); $order_type = $this->getTypeBySpecial( $this->Application->GetVar('order_type') ); $object->SetDBField('Status', $order_type); @@ -2427,7 +2427,7 @@ $this->CheckUser($event); if ( !$object->GetDBField('OrderIP') ) { - $object->SetDBField('OrderIP', $_SERVER['REMOTE_ADDR']); + $object->SetDBField('OrderIP', $this->Application->getClientIp()); } $shipping_option = $this->Application->GetVar('OriginalShippingOption'); Index: branches/5.2.x/units/gateways/gw_classes/atosorigin.php =================================================================== diff -u -N -r15376 -r15568 --- branches/5.2.x/units/gateways/gw_classes/atosorigin.php (.../atosorigin.php) (revision 15376) +++ branches/5.2.x/units/gateways/gw_classes/atosorigin.php (.../atosorigin.php) (revision 15568) @@ -1,6 +1,6 @@ Application->GetSID() . ',' . MD5($item_data['OrderId']); $params['order_id'] = $item_data['OrderId']; - $params['customer_ip_address'] = $_SERVER['REMOTE_ADDR']; + $params['customer_ip_address'] = $this->Application->getClientIp(); $params['customer_id'] = $item_data['PortalUserId']; $billing_email = $item_data['BillingEmail']; Index: branches/5.2.x/units/products/products_event_handler.php =================================================================== diff -u -N -r15540 -r15568 --- branches/5.2.x/units/products/products_event_handler.php (.../products_event_handler.php) (revision 15540) +++ branches/5.2.x/units/products/products_event_handler.php (.../products_event_handler.php) (revision 15568) @@ -1,6 +1,6 @@ GetDBField('ResourceId') . ' - AND IPaddress="' . $_SERVER['REMOTE_ADDR'] . '" + AND IPaddress="' . $this->Application->getClientIp() . '" AND PortalUserId=' . $user_id . ' AND DataType="Rating"'; $res = $this->Conn->GetRow($sql); if ( $res && $res['Expire'] < adodb_mktime() ) { $sql = ' DELETE FROM ' . TABLE_PREFIX . 'SpamControl WHERE ItemResourceId=' . $object->GetDBField('ResourceId') . ' - AND IPaddress="' . $_SERVER['REMOTE_ADDR'] . '" + AND IPaddress="' . $this->Application->getClientIp() . '" AND PortalUserId=' . $user_id . ' AND DataType="Rating"'; $this->Conn->Query($sql); @@ -724,7 +724,7 @@ $sql = ' INSERT INTO ' . TABLE_PREFIX . 'SpamControl (ItemResourceId, IPaddress, PortalUserId, DataType, Expire) VALUES (' . $object->GetDBField('ResourceId') . ', - "' . $_SERVER['REMOTE_ADDR'] . '", + "' . $this->Application->getClientIp() . '", ' . $user_id . ', "Rating", ' . $expire . ')'; Index: branches/5.2.x/units/gateways/gw_classes/rightconnect.php =================================================================== diff -u -N -r15141 -r15568 --- branches/5.2.x/units/gateways/gw_classes/rightconnect.php (.../rightconnect.php) (revision 15141) +++ branches/5.2.x/units/gateways/gw_classes/rightconnect.php (.../rightconnect.php) (revision 15568) @@ -1,6 +1,6 @@ Application->getClientIp(); $post_fields["ADMIN_EMAIL"] = "admin@yourdomain.com";*/ Index: branches/5.2.x/units/gateways/gw_classes/paybox.php =================================================================== diff -u -N -r15376 -r15568 --- branches/5.2.x/units/gateways/gw_classes/paybox.php (.../paybox.php) (revision 15376) +++ branches/5.2.x/units/gateways/gw_classes/paybox.php (.../paybox.php) (revision 15568) @@ -1,6 +1,6 @@ Application->GetSID().','.MD5($item_data['OrderId']); /*$params['order_id'] = $item_data['OrderId']; - $params['customer_ip_address'] = $_SERVER['REMOTE_ADDR']; + $params['customer_ip_address'] = $this->Application->getClientIp(); $params['customer_id'] = $item_data['PortalUserId'];*/ $billing_email = $item_data['BillingEmail']; Index: branches/5.2.x/units/gateways/gw_classes/paypal_direct.php =================================================================== diff -u -N -r15141 -r15568 --- branches/5.2.x/units/gateways/gw_classes/paypal_direct.php (.../paypal_direct.php) (revision 15141) +++ branches/5.2.x/units/gateways/gw_classes/paypal_direct.php (.../paypal_direct.php) (revision 15568) @@ -1,6 +1,6 @@ Application->getClientIp(); $post_fields['USER'] = $gw_params['api_username']; $post_fields['PWD'] = $gw_params['api_password']; $post_fields['SIGNATURE'] = $gw_params['signature'];