On Tue, 2002-04-23 at 18:23, Jani Taskinen wrote:
> 
>     Please make a unified diff against the CVS HEAD (cvs diff -u).
>     
>     --Jani

Index: php_imap.c
===================================================================
RCS file: /repository/php4/ext/imap/php_imap.c,v
retrieving revision 1.113
diff -u -r1.113 php_imap.c
--- php_imap.c  24 Apr 2002 15:29:52 -0000      1.113
+++ php_imap.c  24 Apr 2002 18:00:45 -0000
@@ -1567,10 +1567,9 @@
 {
        zval **streamind, **msgno, **fromlength, **subjectlength,
**defaulthost;        pils *imap_le_struct;
-       unsigned long length;
        MESSAGECACHE *cache;
        ENVELOPE *en;
-       char *mystring, dummy[2000], fulladdress[MAILTMPLEN];
+       char dummy[2000], fulladdress[MAILTMPLEN];
        int myargc = ZEND_NUM_ARGS();

        if (myargc < 2 || myargc > 5 || zend_get_parameters_ex(myargc,
&streamind, &msgno, &fromlength, &subjectlength, &defaulthost) ==
FAILURE) {
@@ -1605,16 +1604,7 @@
                RETURN_FALSE;
        }

-       mystring = mail_fetchheader_full(imap_le_struct->imap_stream,
Z_LVAL_PP(msgno), NIL, &length, NIL);
-       if (myargc == 5) {
-               rfc822_parse_msg(&en, NULL, mystring, length, NULL,
Z_STRVAL_PP(defaulthost), NIL);
-       } else {
-               rfc822_parse_msg(&en, NULL, mystring, length, NULL,
"UNKNOWN", NIL);
-       }
-
-       /* call a function to parse all the text, so that we can use the
-          same function to parse text from other sources */
-       _php_make_header_object(return_value, en TSRMLS_CC);
+       en = mail_fetchenvelope(imap_le_struct->imap_stream,
Z_LVAL_PP(msgno));

        /* now run through properties that are only going to be returned
           from a server, not text headers */
@@ -1646,7 +1636,6 @@
                mail_fetchsubject(fulladdress,
imap_le_struct->imap_stream, Z_LVAL_PP(msgno),
Z_LVAL_PP(subjectlength));
                add_property_string(return_value, "fetchsubject",
fulladdress, 1);
        }
-       mail_free_envelope(&en);
 }
 /* }}} */
 



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to