Ignore:
Timestamp:
11/03/11 13:26:45 (12 years ago)
Author:
wmerlotto
Message:

Ticket #2305 - Enviando alteracoes, desenvolvidas internamente na Prognus. Library: bibliotecas de terceiros.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/library/mime/mimePart.php

    r4414 r5135  
    4949 * @copyright 2003-2006 PEAR <pear-group@php.net> 
    5050 * @license   http://www.opensource.org/licenses/bsd-license.php BSD License 
    51  * @version   CVS: $Id: mimePart.php 305690 2010-11-23 12:41:00Z alec $ 
     51 * @version   CVS: $Id: mimePart.php 314695 2011-08-10 07:18:07Z alec $ 
    5252 * @link      http://pear.php.net/package/Mail_mime 
    5353 */ 
     
    145145    *     cid               - Content ID to apply 
    146146    *     disposition       - Content disposition, inline or attachment 
    147     *     dfilename         - Filename parameter for content disposition 
     147    *     filename          - Filename parameter for content disposition 
    148148    *     description       - Content description 
    149149    *     name_encoding     - Encoding of the attachment name (Content-Type) 
     
    186186                $this->_body_file = $value; 
    187187                break; 
     188 
     189            // for backward compatibility 
     190            case 'dfilename': 
     191                $params['filename'] = $value; 
     192                break; 
    188193            } 
    189194        } 
     
    801806        // Structured header (make sure addr-spec inside is not encoded) 
    802807        if (!empty($separator)) { 
     808            // Simple e-mail address regexp 
     809            $email_regexp = '(\S+|("[^\r\n"]+"))@\S+'; 
     810 
    803811            $parts = Mail_mimePart::_explodeQuotedString($separator, $value); 
    804812            $value = ''; 
     
    818826 
    819827                // let's find phrase (name) and/or addr-spec 
    820                 if (preg_match('/^<\S+@\S+>$/', $part)) { 
     828                if (preg_match('/^<' . $email_regexp . '>$/', $part)) { 
    821829                    $value .= $part; 
    822                 } else if (preg_match('/^\S+@\S+$/', $part)) { 
     830                } else if (preg_match('/^' . $email_regexp . '$/', $part)) { 
    823831                    // address without brackets and without name 
    824832                    $value .= $part; 
    825                 } else if (preg_match('/<*\S+@\S+>*$/', $part, $matches)) { 
     833                } else if (preg_match('/<*' . $email_regexp . '>*$/', $part, $matches)) { 
    826834                    // address with name (handle name) 
    827835                    $address = $matches[0]; 
Note: See TracChangeset for help on using the changeset viewer.