forked from extern/egroupware
getFolderObjects; always use static on single request if info is available; so if you require subscribed/unsubscribed results on a single request you MUST set to false
This commit is contained in:
parent
be60a5036e
commit
509c5f5a24
@ -1949,6 +1949,14 @@ class mail_bo
|
|||||||
{
|
{
|
||||||
if (self::$debug) error_log(__METHOD__.__LINE__.' ServerID:'.$this->icServer->ImapServerId.", subscribedOnly:$_subscribedOnly, getCounters:$_getCounters, alwaysGetDefaultFolders:$_alwaysGetDefaultFolders, _useCacheIfPossible:$_useCacheIfPossible");
|
if (self::$debug) error_log(__METHOD__.__LINE__.' ServerID:'.$this->icServer->ImapServerId.", subscribedOnly:$_subscribedOnly, getCounters:$_getCounters, alwaysGetDefaultFolders:$_alwaysGetDefaultFolders, _useCacheIfPossible:$_useCacheIfPossible");
|
||||||
static $folders2return;
|
static $folders2return;
|
||||||
|
// always use static on single request if info is available;
|
||||||
|
// so if you require subscribed/unsubscribed results on a single request you MUST
|
||||||
|
// set $_useCacheIfPossible to false !
|
||||||
|
if ($_useCacheIfPossible && isset($folders2return[$this->icServer->ImapServerId]) && !empty($folders2return[$this->icServer->ImapServerId]))
|
||||||
|
{
|
||||||
|
return $folders2return[$this->icServer->ImapServerId];
|
||||||
|
}
|
||||||
|
|
||||||
if ($_subscribedOnly && $_getCounters===false)
|
if ($_subscribedOnly && $_getCounters===false)
|
||||||
{
|
{
|
||||||
if (is_null($folders2return)) $folders2return = egw_cache::getCache(egw_cache::INSTANCE,'email','folderObjects'.trim($GLOBALS['egw_info']['user']['account_id']),$callback=null,$callback_params=array(),$expiration=60*60*1);
|
if (is_null($folders2return)) $folders2return = egw_cache::getCache(egw_cache::INSTANCE,'email','folderObjects'.trim($GLOBALS['egw_info']['user']['account_id']),$callback=null,$callback_params=array(),$expiration=60*60*1);
|
||||||
|
@ -1175,7 +1175,7 @@ class mail_compose
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//error_log(__METHOD__.__LINE__.$content['body']);
|
//error_log(__METHOD__.__LINE__.array2string($content));
|
||||||
if($content['mimeType'] == 'html') {
|
if($content['mimeType'] == 'html') {
|
||||||
$ishtml=1;
|
$ishtml=1;
|
||||||
} else {
|
} else {
|
||||||
@ -1282,6 +1282,7 @@ class mail_compose
|
|||||||
// or not work as expected, as a full featured editor that may be wanted in other apps
|
// or not work as expected, as a full featured editor that may be wanted in other apps
|
||||||
// is way overloading the "normal" needs for composing mails
|
// is way overloading the "normal" needs for composing mails
|
||||||
$content['rtfEditorFeatures']='simple-withimage';//egw_ckeditor_config::get_ckeditor_config();
|
$content['rtfEditorFeatures']='simple-withimage';//egw_ckeditor_config::get_ckeditor_config();
|
||||||
|
//$content['rtfEditorFeatures']='advanced';//egw_ckeditor_config::get_ckeditor_config();
|
||||||
$content['validation_rules']= json_encode(mail_bo::$htmLawed_config);
|
$content['validation_rules']= json_encode(mail_bo::$htmLawed_config);
|
||||||
$etpl->setElementAttribute('mail_htmltext','mode',$content['rtfEditorFeatures']);
|
$etpl->setElementAttribute('mail_htmltext','mode',$content['rtfEditorFeatures']);
|
||||||
$etpl->setElementAttribute('mail_htmltext','validation_rules',$content['validation_rules']);
|
$etpl->setElementAttribute('mail_htmltext','validation_rules',$content['validation_rules']);
|
||||||
|
@ -189,12 +189,18 @@ class mail_ui
|
|||||||
$stmpl = new etemplate_new('mail.subscribe');
|
$stmpl = new etemplate_new('mail.subscribe');
|
||||||
|
|
||||||
$profileId = $_GET['acc_id'];
|
$profileId = $_GET['acc_id'];
|
||||||
$zstarttime = microtime (true);
|
//$zstarttime = microtime (true);
|
||||||
$sel_options['foldertree'] = $this->getFolderTree(false, $profileId,false,false);
|
$sel_options['foldertree'] = $this->getFolderTree(false, $profileId,false,false);
|
||||||
$zendtime = microtime(true) - $zstarttime;
|
//$zendtime = microtime(true) - $zstarttime;
|
||||||
error_log(__METHOD__.__LINE__. " time used: ".$zendtime);
|
//error_log(__METHOD__.__LINE__. " Building tree -> time used: ".$zendtime);
|
||||||
|
//$zstarttime = microtime (true);
|
||||||
$unsubscribedFolders = $this->mail_bo->fetchUnSubscribedFolders();
|
$unsubscribedFolders = $this->mail_bo->fetchUnSubscribedFolders();
|
||||||
|
//$zendtime = microtime(true) - $zstarttime;
|
||||||
|
//error_log(__METHOD__.__LINE__. " Fetching Unsubscribed -> time used: ".$zendtime);
|
||||||
|
//$zstarttime = microtime (true);
|
||||||
$allFolders = $this->mail_bo->getFolderObjects();
|
$allFolders = $this->mail_bo->getFolderObjects();
|
||||||
|
//$zendtime = microtime(true) - $zstarttime;
|
||||||
|
//error_log(__METHOD__.__LINE__. " getFolderObjects -> time used: ".$zendtime);
|
||||||
|
|
||||||
if (!is_array($content))
|
if (!is_array($content))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user