From: Thijs K. <ki...@us...> - 2002-08-05 10:39:07
|
Update of /cvsroot/squirrelmail/squirrelmail/src In directory usw-pr-cvs1:/tmp/cvs-serv1956 Modified Files: Tag: SM-1_2-STABLE draft_actions.php Log Message: rg=off for drafts Index: draft_actions.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/src/draft_actions.php,v retrieving revision 1.19 retrieving revision 1.19.2.1 diff -u -w -r1.19 -r1.19.2.1 --- draft_actions.php 16 May 2002 08:20:01 -0000 1.19 +++ draft_actions.php 5 Aug 2002 10:39:04 -0000 1.19.2.1 @@ -13,10 +13,23 @@ /* Print all the needed RFC822 headers */ function write822HeaderForDraft ($fp, $t, $c, $b, $subject, $more_headers, $session) { - global $REMOTE_ADDR, $SERVER_NAME, $REMOTE_PORT; global $data_dir, $username, $popuser, $domain, $version, $useSendmail; - global $default_charset, $HTTP_VIA, $HTTP_X_FORWARDED_FOR; - global $REMOTE_HOST, $identity; + global $default_charset, $identity; + + /* get those globals */ + $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']; + } /* Storing the header to make sure the header is the same */ /* everytime the header is printed. */ @@ -143,11 +156,14 @@ function saveMessageAsDraft($t, $c, $b, $subject, $body, $reply_id, $prio = 3, $session) { global $useSendmail, $msg_id, $is_reply, $mailbox, $onetimepad, - $data_dir, $username, $domain, $key, $version, $sent_folder, + $data_dir, $domain, $version, $sent_folder, $imapServerAddress, $imapPort, $draft_folder, $attachment_dir, $default_use_priority; $more_headers = Array(); + $username = $_SESSION['username']; + $key = $_COOKIE['key']; + if ($default_use_priority) { $more_headers = array_merge($more_headers, createPriorityHeaders($prio)); } |