[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squirrelmail-cvs
Subject:    [SM-CVS] SF.net SVN: squirrelmail:[13955] trunk/squirrelmail
From:       pdontthink () users ! sourceforge ! net
Date:       2010-06-21 8:16:05
Message-ID: E1OQcAn-0004r2-LE () sfp-svn-5 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 13955
          http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=13955&view=rev
Author:   pdontthink
Date:     2010-06-21 08:16:05 +0000 (Mon, 21 Jun 2010)

Log Message:
-----------
Now fill in default subject when forwarding as attachment (#2936541)

Modified Paths:
--------------
    trunk/squirrelmail/doc/ChangeLog
    trunk/squirrelmail/functions/mailbox_display.php
    trunk/squirrelmail/src/compose.php

Modified: trunk/squirrelmail/doc/ChangeLog
===================================================================
--- trunk/squirrelmail/doc/ChangeLog	2010-06-21 08:08:16 UTC (rev 13954)
+++ trunk/squirrelmail/doc/ChangeLog	2010-06-21 08:16:05 UTC (rev 13955)
@@ -344,6 +344,7 @@
     (reduces chances of session data growing too large)
   - Fixed minor vulnerability in Mail Fetch plugin \
                [CVE-2010-1637/TEHTRI-SA-2010-009]
   - Now properly quote personal part of encoded addresses when replying.
+  - Now fill in default subject when forwarding as attachment (#2936541)
 
 Version 1.5.1 (branched on 2006-02-12)
 --------------------------------------

Modified: trunk/squirrelmail/functions/mailbox_display.php
===================================================================
--- trunk/squirrelmail/functions/mailbox_display.php	2010-06-21 08:08:16 UTC (rev \
                13954)
+++ trunk/squirrelmail/functions/mailbox_display.php	2010-06-21 08:16:05 UTC (rev \
13955) @@ -1532,6 +1532,17 @@
             fclose($fp);
 
             $composeMessage->initAttachment('message/rfc822', $subject . '.eml', \
$filename); +
+            // create subject for new message
+            //
+            $subject = decodeHeader($subject,false,false,true);
+            $subject = str_replace('"', "'", $subject);
+            $subject = trim($subject);
+            if (substr(strtolower($subject), 0, 4) != 'fwd:') {
+                $subject = 'Fwd: ' . $subject;
+            }
+            $composeMessage->rfc822_header->subject = $subject;
+
         }
     }
 

Modified: trunk/squirrelmail/src/compose.php
===================================================================
--- trunk/squirrelmail/src/compose.php	2010-06-21 08:08:16 UTC (rev 13954)
+++ trunk/squirrelmail/src/compose.php	2010-06-21 08:16:05 UTC (rev 13955)
@@ -734,6 +734,11 @@
 
     $values = newMail($mailbox,$passed_id,$passed_ent_id, $action, $session);
 
+    // forward as attachment - subject is in the message in session
+    //
+    if ($action == 'forward_as_attachment' && empty($values['subject']))
+        $subject = $composeMessage->rfc822_header->subject;
+
     /* in case the origin is not read_body.php */
     if (isset($send_to)) {
         $values['send_to'] = $send_to;
@@ -945,6 +950,12 @@
             case ('forward_as_attachment'):
                 $subject = \
                getforwardSubject(decodeHeader($orig_header->subject,false,false,true));
                
                 $composeMessage = getMessage_RFC822_Attachment($message, \
$composeMessage, $passed_id, $passed_ent_id, $imapConnection); +                \
$subject = decodeHeader($orig_header->subject,false,false,true); +                \
$subject = str_replace('"', "'", $subject); +                $subject = \
trim($subject); +                if (substr(strtolower($subject), 0, 4) != 'fwd:') {
+                    $subject = 'Fwd: ' . $subject;
+                }
                 $body = '';
                 break;
             case ('reply_all'):


This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
-----
squirrelmail-cvs mailing list
List address: squirrelmail-cvs@lists.sourceforge.net
List info (subscribe/unsubscribe/change options): \
                https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
Repository: http://squirrelmail.org/svn


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic