From: stekkel Date: Wed, 25 Sep 2002 18:03:52 +0000 (+0000) Subject: rg=0 fixes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=88a51841c54f46067335db72489de7533bc6fea9;p=squirrelmail.git rg=0 fixes git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3734 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/class/deliver/Deliver.class.php b/class/deliver/Deliver.class.php index 2dfb2c71..1d639574 100644 --- a/class/deliver/Deliver.class.php +++ b/class/deliver/Deliver.class.php @@ -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();