Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Fix IMAP access driver that was failing if cache was enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Nov 21, 2016
1 parent c61b46c commit 442478d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions core/src/plugins/access.imap/ImapAccessDriver.php
Expand Up @@ -218,11 +218,16 @@ public function countChildren(AJXP_Node $dirNode, $foldersOnly = false, $nonEmpt
{
if($foldersOnly) return 0;
$count = 0;
if($tmpHandle = opendir($dirNode->getUrl())){
if($dirHANDLE !== null){
$tmpHandle = $dirHANDLE;
}else{
$tmpHandle = opendir($dirNode->getUrl());
}
if($tmpHandle !== false){
// WILL USE IMAP FUNCTIONS TO COUNT;
$this->logDebug("COUNT : ".ImapAccessWrapper::getCurrentDirCount());
$count = ImapAccessWrapper::getCurrentDirCount();
closedir($tmpHandle);
//closedir($tmpHandle);
}
return $count;
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/editor.eml/manifest.xml
Expand Up @@ -62,7 +62,7 @@
</action>
</actions>
<hooks>
<serverCallback hookName="node.info" methodName="extractMimeHeaders"/>
<serverCallback hookName="node.info.nocache" methodName="extractMimeHeaders"/>
</hooks>
</registry_contributions>
<dependencies>
Expand Down

0 comments on commit 442478d

Please sign in to comment.