forked from extern/egroupware
Fix some IDE warnings
This commit is contained in:
parent
c4af049ac9
commit
9cf5fc20db
@ -2649,14 +2649,11 @@ class emailadmin_imapbase
|
|||||||
if (self::$mailConfig['examineNamespace'])
|
if (self::$mailConfig['examineNamespace'])
|
||||||
{
|
{
|
||||||
$nameSpace = $this->_getNameSpaces();
|
$nameSpace = $this->_getNameSpaces();
|
||||||
//error_log(__METHOD__.__LINE__.array2string($nameSpace));
|
|
||||||
$prefixes=array();
|
$prefixes=array();
|
||||||
if (is_array($nameSpace))
|
if (is_array($nameSpace))
|
||||||
{
|
{
|
||||||
foreach($nameSpace as $k => $singleNameSpace) {
|
foreach($nameSpace as $k => $singleNameSpace) {
|
||||||
$type = $singleNameSpace['type'];
|
$type = $singleNameSpace['type'];
|
||||||
// the following line (assumption that for the same namespace the delimiter should be equal) may be wrong
|
|
||||||
$foldersNameSpace[$type]['delimiter'] = $singleNameSpace['delimiter'];
|
|
||||||
|
|
||||||
if(is_array($singleNameSpace) && $singleNameSpace['prefix']){
|
if(is_array($singleNameSpace) && $singleNameSpace['prefix']){
|
||||||
$prefixes[$type] = $singleNameSpace['prefix'];
|
$prefixes[$type] = $singleNameSpace['prefix'];
|
||||||
@ -2672,14 +2669,16 @@ class emailadmin_imapbase
|
|||||||
}
|
}
|
||||||
foreach ($topFolders as &$node)
|
foreach ($topFolders as &$node)
|
||||||
{
|
{
|
||||||
//error_log(__METHOD__.__LINE__.array2string($node));
|
|
||||||
$pattern = "/\\".$delimiter."/";
|
$pattern = "/\\".$delimiter."/";
|
||||||
$reference = preg_replace($pattern, '', $node['MAILBOX']);
|
$reference = preg_replace($pattern, '', $node['MAILBOX']);
|
||||||
if(!empty($prefixes))
|
if(!empty($prefixes))
|
||||||
{
|
{
|
||||||
$reference = '';
|
$reference = '';
|
||||||
$tmpArray = explode($delimiter,$node['MAILBOX']);
|
$tmpArray = explode($delimiter,$node['MAILBOX']);
|
||||||
foreach($tmpArray as $p) $reference = empty($reference)?$p:$reference.$delimiter.$p;
|
foreach($tmpArray as $p)
|
||||||
|
{
|
||||||
|
$reference = empty($reference)?$p:$reference.$delimiter.$p;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$mainFolder = $subFolders = array();
|
$mainFolder = $subFolders = array();
|
||||||
|
|
||||||
@ -2700,8 +2699,7 @@ class emailadmin_imapbase
|
|||||||
$mainFolder = $this->icServer->getMailboxes($reference, 1, true);
|
$mainFolder = $this->icServer->getMailboxes($reference, 1, true);
|
||||||
$subFolders = $this->icServer->getMailboxes($node['MAILBOX'].$node['delimiter'], $_search, true);
|
$subFolders = $this->icServer->getMailboxes($node['MAILBOX'].$node['delimiter'], $_search, true);
|
||||||
}
|
}
|
||||||
//error_log(__METHOD__.__LINE__.$reference.'.'.array2string($mainFolder));
|
|
||||||
//error_log(__METHOD__.__LINE__.$node['MAILBOX'].$node['delimiter'].'.'.array2string($subFolders));
|
|
||||||
if (is_array($mainFolder['INBOX']))
|
if (is_array($mainFolder['INBOX']))
|
||||||
{
|
{
|
||||||
// Array container of auto folders
|
// Array container of auto folders
|
||||||
|
Loading…
Reference in New Issue
Block a user