From d1a9885f218896bbc3fc7beff914594a6b8763da Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Wed, 24 Nov 2010 02:38:02 -0500
Subject: [PATCH] - Small code cleanup
---
program/include/rcube_imap.php | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 468d98c..4c02180 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -690,20 +690,19 @@
$result = array();
if (!empty($this->icache['threads'])) {
+ $dcount = count($this->icache['threads']['depth']);
$result = array(
'count' => count($this->icache['threads']['tree']),
- 'msgcount' => count($this->icache['threads']['depth']),
- 'maxuid' => !empty($this->icache['threads']['depth']) ?
- max(array_keys($this->icache['threads']['depth'])) : 0,
+ 'msgcount' => $dcount,
+ 'maxuid' => $dcount ? max(array_keys($this->icache['threads']['depth'])) : 0,
);
}
else if (is_array($result = $this->_fetch_threads($mailbox))) {
-// list ($thread_tree, $msg_depth, $has_children) = $result;
-// $this->update_thread_cache($mailbox, $thread_tree, $msg_depth, $has_children);
+ $dcount = count($result[1]);
$result = array(
'count' => count($result[0]),
- 'msgcount' => count($result[1]),
- 'maxuid' => !empty($result[1]) ? max(array_keys($result[1])) : 0,
+ 'msgcount' => $dcount,
+ 'maxuid' => $dcount ? max(array_keys($result[1])) : 0,
);
}
--
Gitblit v1.9.1