Exemplo n.º 1
0
 /**
  * @param int $pageNumber
  * @param Folder $folder optional
  * @return WebMailMessageCollection
  */
 function &GetMessageHeaders($pageNumber, &$folder)
 {
     $messageHeaders = null;
     ConvertUtils::SetLimits();
     if ($folder && $folder->SyncType == FOLDERSYNC_DirectMode) {
         if ($this->MailStorage->Connect()) {
             $GLOBALS[MailDefaultCharset] = $this->_account->GetDefaultIncCharset();
             $GLOBALS[MailOutputCharset] = $this->_account->GetUserCharset();
             $messageHeaders =& $this->MailStorage->LoadMessageHeaders($pageNumber, $folder);
         }
         return $messageHeaders;
     }
     if ($folder && $this->DbStorage->Connect()) {
         $GLOBALS[MailDefaultCharset] = $this->_account->DbCharset;
         $GLOBALS[MailOutputCharset] = $this->_account->GetUserCharset();
         $messageHeaders =& $this->DbStorage->LoadMessageHeaders($pageNumber, $folder);
     }
     return $messageHeaders;
 }
Exemplo n.º 2
0
 /**
  * @param int $pageNumber
  * @param Folder $folder optional
  * @return WebMailMessageCollection
  */
 function &GetMessageHeaders($pageNumber, &$folder)
 {
     $messageHeaders = null;
     @ini_set('memory_limit', MEMORYLIMIT);
     @set_time_limit(TIMELIMIT);
     if ($folder->SyncType == FOLDERSYNC_DirectMode) {
         if ($this->MailStorage->Connect()) {
             $GLOBALS[MailDefaultCharset] = $this->_account->GetDefaultIncCharset();
             $GLOBALS[MailOutputCharset] = $this->_account->GetUserCharset();
             $messageHeaders =& $this->MailStorage->LoadMessageHeaders($pageNumber, $folder);
         }
         return $messageHeaders;
     }
     if ($this->DbStorage->Connect()) {
         $GLOBALS[MailDefaultCharset] = $this->_account->DbCharset;
         $GLOBALS[MailOutputCharset] = $this->_account->GetUserCharset();
         $messageHeaders =& $this->DbStorage->LoadMessageHeaders($pageNumber, $folder);
     }
     return $messageHeaders;
 }