rg=0 fixes
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 25 Sep 2002 18:03:52 +0000 (18:03 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 25 Sep 2002 18:03:52 +0000 (18:03 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3734 7612ce4b-ef26-0410-bec9-ea0150e637f0

class/deliver/Deliver.class.php

index 2dfb2c71880d8b1d57fcabb4c9d3df879695f964..1d639574f6f12fa57d0db52014fc403d166c3105 100644 (file)
@@ -220,10 +220,19 @@ class Deliver {
     }    
 
     function prepareRFC822_Header($rfc822_header, $reply_rfc822_header, &$raw_length) {
-       global $REMOTE_ADDR, $SERVER_NAME, $REMOTE_PORT;
-       global $version, $useSendmail, $username;
-       global $HTTP_VIA, $HTTP_X_FORWARDED_FOR;
-       global $REMOTE_HOST;
+        $REMOTE_ADDR = $_SERVER['REMOTE_ADDR'];
+        $SERVER_NAME = $_SERVER['SERVER_NAME'];
+        $REMOTE_PORT = $_SERVER['REMOTE_PORT'];
+        if(isset($_SERVER['REMOTE_HOST'])) {
+            $REMOTE_HOST = $_SERVER['REMOTE_HOST'];
+        }
+        if(isset($_SERVER['HTTP_VIA'])) {
+            $HTTP_VIA = $_SERVER['HTTP_VIA'];
+        }
+        if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
+            $HTTP_X_FORWARDED_FOR = $_SERVER['HTTP_X_FORWARDED_FOR'];
+        }
+       global $version, $username;
        $rn = "\r\n";
        /* This creates an RFC 822 date */
        $date = date("D, j M Y H:i:s ", mktime()) . $this->timezone();