summaryrefslogtreecommitdiff
path: root/ext/imap/php_imap.c
diff options
context:
space:
mode:
authorChuck Hagenbuch <chagenbu@php.net>2001-05-03 19:18:48 +0000
committerChuck Hagenbuch <chagenbu@php.net>2001-05-03 19:18:48 +0000
commit5c0791fcacfd043f8362aff1400d4e3629b43fda (patch)
treeabc10dc13e527916fd209116cffe7d3511096f99 /ext/imap/php_imap.c
parentcbb777f1676cc6e676d0de592ca97f245c3f0ede (diff)
downloadphp-git-5c0791fcacfd043f8362aff1400d4e3629b43fda.tar.gz
Fix for #8359. imap_fetchheader should never return the full message; the
FT_PREFETCHTEXT flag is just a hint to c-client that you'll be asking for the message text next.
Diffstat (limited to 'ext/imap/php_imap.c')
-rw-r--r--ext/imap/php_imap.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index 649406a560..d81de05344 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -2808,17 +2808,7 @@ PHP_FUNCTION(imap_fetchheader)
RETURN_FALSE;
}
- if ((myargc == 3) && (Z_LVAL_PP(flags) & FT_PREFETCHTEXT)) {
- header = mail_fetchheader_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), NIL, &hlen, Z_LVAL_PP(flags));
- body = mail_fetchtext_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), &blen, Z_LVAL_PP(flags));
- tempstring = emalloc(hlen+blen+1);
- strcpy(tempstring,header);
- strcat(tempstring,body);
- RETVAL_STRINGL(tempstring,(hlen+blen+1),1);
- efree(tempstring);
- } else {
- RETVAL_STRING(mail_fetchheader_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), NIL, NIL, (myargc == 3 ? Z_LVAL_PP(flags) : NIL)), 1);
- }
+ RETVAL_STRING(mail_fetchheader_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), NIL, NIL, (myargc == 3 ? Z_LVAL_PP(flags) : NIL)), 1);
}
/* }}} */