Changeset 322b79d in github


Ignore:
Timestamp:
Nov 20, 2008 3:46:59 AM (5 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
300fc65
Parents:
4e5b11a
Message:
  • Speed up raw message body handling (call FETCH only once for the whole message insteade of twice for headers and body)
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    rceb52fe0 r322b79d  
    55---------- 
    66- Fix handling of some malformed messages (#1484438) 
     7- Speed up raw message body handling 
    78 
    892008/11/15 (alec) 
  • program/include/rcube_imap.php

    rf1d0208 r322b79d  
    14371437      return FALSE; 
    14381438 
    1439     $body = iil_C_FetchPartHeader($this->conn, $this->mailbox, $msg_id, NULL); 
    1440     $body .= iil_C_HandlePartBody($this->conn, $this->mailbox, $msg_id, NULL, 1); 
    1441  
    1442     return $body;     
     1439    return iil_C_HandlePartBody($this->conn, $this->mailbox, $msg_id); 
    14431440    } 
    14441441 
     
    14711468      return FALSE; 
    14721469 
    1473     print iil_C_FetchPartHeader($this->conn, $this->mailbox, $msg_id, NULL); 
    1474     flush(); 
    14751470    iil_C_HandlePartBody($this->conn, $this->mailbox, $msg_id, NULL, 2); 
    14761471    } 
  • program/lib/imap.inc

    rf14ac8c r322b79d  
    7272                - added 3rd argument in iil_StartsWith* functions 
    7373                - fix iil_C_FetchPartHeader() in some cases by use of iil_C_HandlePartBody() 
     74                - allow iil_C_HandlePartBody() to fetch whole message 
    7475 
    7576********************************************************/ 
     
    23762377} 
    23772378 
    2378 function iil_C_HandlePartBody(&$conn, $mailbox, $id, $part, $mode, $file=NULL) { 
     2379function iil_C_HandlePartBody(&$conn, $mailbox, $id, $part='', $mode=1, $file=NULL) { 
    23792380        /* modes: 
    23802381        1: return string (or write to $file pointer) 
     
    23852386        $fp     = $conn->fp; 
    23862387        $result = false; 
    2387         if (empty($part)) { 
    2388                 $part = 'TEXT'; 
    2389         } 
    23902388 
    23912389        if (iil_C_Select($conn, $mailbox)) { 
Note: See TracChangeset for help on using the changeset viewer.