* eMail: fix bug regarding ->foldertype SENT not detected on preview of message <-

This commit is contained in:
Klaus Leithoff 2011-08-01 14:23:45 +00:00
parent 1205c7b347
commit 0d94e7f0d3
7 changed files with 21 additions and 8 deletions

View File

@ -519,6 +519,8 @@ class ajaxfelamimail
$this->bofelamimail->restoreSessionData();
//error_log($this->sessionData['previewMessage']);
//error_log(__METHOD__.__LINE__.' ->'.$_folderName.' ShowAsSent:'.$GLOBALS['egw_info']['user']['preferences']['felamimail']['messages_showassent_0']);
if($this->bofelamimail->isSentFolder($_folderName) ||
false !== in_array($_folderName,explode(',',$GLOBALS['egw_info']['user']['preferences']['felamimail']['messages_showassent_0'])))
{

View File

@ -451,6 +451,7 @@ class felamimail_bo
}
function closeConnection() {
//if ($icServer->_connected) error_log(__METHOD__.__LINE__.' disconnect from Server');
if ($icServer->_connected) $this->icServer->disconnect();
}
@ -3328,12 +3329,13 @@ class felamimail_bo
$this->icServer->_connectionErrorObject->message .= $this->errorMessage .= $errormessage;
return false;
}
//error_log( "---------------------------open connection ".function_backtrace());
//error_log(print_r($this->icServer,true));
//error_log( "-------------------------->open connection ".function_backtrace());
//error_log(__METHOD__.__LINE__.' ->'.array2string($this->icServer));
if ($this->icServer->_connected == 1) {
$tretval = $this->icServer->selectMailbox($this->icServer->currentMailbox);
//error_log(__METHOD__." using existing Connection ProfileID:".$_icServerID.' Status:'.print_r($this->icServer->_connected,true));
} else {
//error_log( "-------------------------->open connection for Server with profileID:".$_icServerID.function_backtrace());
$tretval = $this->icServer->openConnection($_adminConnection);
//error_log(__METHOD__." open new Connection ProfileID:".$_icServerID.' Status:'.print_r($this->icServer->_connected,true));
}

View File

@ -711,6 +711,9 @@ class uifelamimail
$this->t->set_var('activeServerID',self::$icServerID);
$this->t->set_var('activeFolder',$urlMailbox);
$this->t->set_var('activeFolderB64',base64_encode($this->mailbox));
$sentFolder = $this->bofelamimail->getSentFolder(false);
$this->t->set_var('sentFolder',($sentFolder?$sentFolder:''));
$this->t->set_var('sentFolderB64',($sentFolder?base64_encode($sentFolder):''));
$draftFolder = $this->bofelamimail->getDraftFolder(false);
$this->t->set_var('draftFolder',($draftFolder?$draftFolder:''));
$this->t->set_var('draftFolderB64',($draftFolder?base64_encode($draftFolder):''));

View File

@ -1311,6 +1311,7 @@ $j(document).ready(function() {
function updateMessagePreview($headerData,$_folderType,$_folderName,$_icServer=0)
{
//error_log(__METHOD__.__LINE__." Type:$_folderType, Folder:$_folderName ->".function_backtrace());
// IFrame for Preview ....
if ($headerData['uid'] && $this->use_preview)
{

View File

@ -583,6 +583,7 @@ function selectedGridChange(_selectAll) {
MessageBuffer ='';
fm_previewMessageFolderType = 0;
if (activeFolderB64 == sentFolderB64) fm_previewMessageFolderType = 1;
if (activeFolderB64 == draftFolderB64) fm_previewMessageFolderType = 2;
if (activeFolderB64 == templateFolderB64) fm_previewMessageFolderType = 3;

View File

@ -36,10 +36,12 @@ var MessageBuffer;
var activeServerID = '{activeServerID}';
var activeFolder = '{activeFolder}';
var activeFolderB64 = '{activeFolderB64}';
var draftFolder = '{draftFolder}';
var draftFolderB64 = '{draftFolderB64}';
var sentFolder = '{sentFolder}';
var sentFolderB64 = '{sentFolderB64}';
var draftFolder = '{draftFolder}';
var draftFolderB64 = '{draftFolderB64}';
var templateFolder = '{templateFolder}';
var templateFolderB64 = '{templateFolderB64}';
var templateFolderB64 = '{templateFolderB64}';
var activityImagePath = '{ajax-loader}';
var test = '';

View File

@ -36,10 +36,12 @@ var MessageBuffer;
var activeServerID = '{activeServerID}';
var activeFolder = '{activeFolder}';
var activeFolderB64 = '{activeFolderB64}';
var draftFolder = '{draftFolder}';
var draftFolderB64 = '{draftFolderB64}';
var sentFolder = '{sentFolder}';
var sentFolderB64 = '{sentFolderB64}';
var draftFolder = '{draftFolder}';
var draftFolderB64 = '{draftFolderB64}';
var templateFolder = '{templateFolder}';
var templateFolderB64 = '{templateFolderB64}';
var templateFolderB64 = '{templateFolderB64}';
var activityImagePath = '{ajax-loader}';
var test = '';