mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 23:29:31 +01:00
try common default for autofolder personal prefix+AutoFolderName, if everything else fails while trying to fetch a special use folder
This commit is contained in:
parent
c1c072696c
commit
410f52b678
@ -3617,10 +3617,10 @@ class felamimail_bo
|
||||
function _getSpecialUseFolder($_type, $_checkexistance=TRUE)
|
||||
{
|
||||
static $types = array(
|
||||
'Drafts'=>array('prefName'=>'draftFolder','profileKey'=>'draftfolder'),
|
||||
'Template'=>array('prefName'=>'templateFolder','profileKey'=>'templatefolder'),
|
||||
'Trash'=>array('prefName'=>'trashFolder','profileKey'=>'trashfolder'),
|
||||
'Sent'=>array('prefName'=>'sentFolder','profileKey'=>'sentfolder'),
|
||||
'Drafts'=>array('prefName'=>'draftFolder','profileKey'=>'draftfolder','autoFolderName'=>'Drafts'),
|
||||
'Template'=>array('prefName'=>'templateFolder','profileKey'=>'templatefolder','autoFolderName'=>'Templates'),
|
||||
'Trash'=>array('prefName'=>'trashFolder','profileKey'=>'trashfolder','autoFolderName'=>'Trash'),
|
||||
'Sent'=>array('prefName'=>'sentFolder','profileKey'=>'sentfolder','autoFolderName'=>'Sent'),
|
||||
);
|
||||
if (!isset($types[$_type]))
|
||||
{
|
||||
@ -3639,6 +3639,14 @@ class felamimail_bo
|
||||
}
|
||||
//no (valid) folder found yet; try specialUseFolders
|
||||
if (empty($_folderName) && is_array(self::$specialUseFolders) && ($f = array_search($_type,self::$specialUseFolders))) $_folderName = $f;
|
||||
//no specialUseFolder; try some Defaults
|
||||
if (empty($_folderName) && isset($types[$_type]))
|
||||
{
|
||||
$nameSpace = $this->_getNameSpaces();
|
||||
$prefix='';
|
||||
if (isset($nameSpace['personal'])) $prefix = $nameSpace['personal']['prefix'];
|
||||
if (self::folderExists($prefix.$types[$_type]['autoFolderName'])) $_folderName = $prefix.$types[$_type]['autoFolderName'];
|
||||
}
|
||||
return $_folderName;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user