Changeset 4312345 in github


Ignore:
Timestamp:
Sep 16, 2010 7:29:53 AM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
b8d96f6
Parents:
2280757
Message:
  • Fix when IMAP connection fails in 'get' action session shouldn't be destroyed (#1486995)
  • Performance: improve mail/get action and skip one IMAP connection
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r99b8c1e r4312345  
    2323- Fix messages background image handling in some cases (#1486990) 
    2424- Fix format=flowed handling (#1486989) 
     25- Fix when IMAP connection fails in 'get' action session shouldn't be destroyed (#1486995) 
    2526 
    2627RELEASE 0.4 
  • program/steps/mail/func.inc

    r33dfdd8 r4312345  
    2727$EMAIL_ADDRESS_PATTERN = '([a-z0-9][a-z0-9\-\.\+\_]*@[a-z0-9][a-z0-9\-\.]*\\.[a-z]{2,5})'; 
    2828 
    29 // actions that do not require imap connection 
    30 $NOIMAP_ACTIONS = array('addcontact', 'autocomplete', 'upload', 'display-attachment', 'remove-attachment'); 
     29// actions that do not require imap connection here 
     30$NOIMAP_ACTIONS = array('addcontact', 'autocomplete', 'upload', 'display-attachment', 'remove-attachment', 'get'); 
    3131 
    3232// always instantiate imap object (but not yet connect to server) 
  • program/steps/mail/get.inc

    r9bb1fc7 r4312345  
    3535 
    3636ob_end_clean(); 
     37 
     38// Now we need IMAP connection 
     39if (!$RCMAIL->imap_connect()) { 
     40  // Get action is often executed simultanously. 
     41  // Some servers have MAXPERIP or other limits. 
     42  // To workaround this we'll wait for some time 
     43  // and try again (once). 
     44  // Note: When message contains more inline parts and the server limit is low 
     45  // this stil maybe the issue, while we're using the same sleep interval, but 
     46  // I didn't found better solution. 
     47  if (!isset($_GET['_redirected'])) { 
     48    sleep(2); 
     49    header('Location: ' . $_SERVER['REQUEST_URI'] . '&_redirected=1'); 
     50  } 
     51  else { 
     52    raise_error(array( 
     53      'code' => 500, 'type' => 'php', 
     54      'file' => __FILE__, 'line' => __LINE__, 
     55      'message' => 'Unable to get/display message part. IMAP connection error'), 
     56      true, true); 
     57  } 
     58  // Don't kill session, just quit (#1486995) 
     59  exit; 
     60} 
    3761 
    3862// similar code as in program/steps/mail/show.inc 
Note: See TracChangeset for help on using the changeset viewer.