[Svn] r4255 - trunk/roundcubemail/program/include

trac at roundcube.net trac at roundcube.net
Wed Nov 24 08:38:02 CET 2010


Author: alec
Date: 2010-11-24 01:38:02 -0600 (Wed, 24 Nov 2010)
New Revision: 4255

Modified:
   trunk/roundcubemail/program/include/rcube_imap.php
Log:
- Small code cleanup


Modified: trunk/roundcubemail/program/include/rcube_imap.php
===================================================================
--- trunk/roundcubemail/program/include/rcube_imap.php	2010-11-23 19:26:11 UTC (rev 4254)
+++ trunk/roundcubemail/program/include/rcube_imap.php	2010-11-24 07:38:02 UTC (rev 4255)
@@ -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,
             );
         }
 

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list