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

trac at roundcube.net trac at roundcube.net
Thu Nov 18 15:24:47 CET 2010


Author: alec
Date: 2010-11-18 08:24:47 -0600 (Thu, 18 Nov 2010)
New Revision: 4233

Modified:
   trunk/roundcubemail/program/include/rcube_imap.php
Log:
- Add threads() result checking


Modified: trunk/roundcubemail/program/include/rcube_imap.php
===================================================================
--- trunk/roundcubemail/program/include/rcube_imap.php	2010-11-18 10:34:10 UTC (rev 4232)
+++ trunk/roundcubemail/program/include/rcube_imap.php	2010-11-18 14:24:47 UTC (rev 4233)
@@ -904,14 +904,14 @@
     {
         if (empty($this->icache['threads'])) {
             // get all threads
-            list ($thread_tree, $msg_depth, $has_children) = $this->conn->thread(
-                $mailbox, $this->threading, $this->skip_deleted ? 'UNDELETED' : '');
+            $result = $this->conn->thread($mailbox, $this->threading,
+                $this->skip_deleted ? 'UNDELETED' : '');
 
             // add to internal (fast) cache
             $this->icache['threads'] = array();
-            $this->icache['threads']['tree'] = $thread_tree;
-            $this->icache['threads']['depth'] = $msg_depth;
-            $this->icache['threads']['has_children'] = $has_children;
+            $this->icache['threads']['tree'] = is_array($result) ? $result[0] : array();
+            $this->icache['threads']['depth'] = is_array($result) ? $result[1] : array();
+            $this->icache['threads']['has_children'] = is_array($result) ? $result[2] : array();
         }
 
         return array(
@@ -1692,7 +1692,7 @@
 
             return $a_messages;
         }
-        
+
         if ($sort_field && $this->get_capability('SORT')) {
             $charset = $charset ? $charset : $this->default_charset;
             $a_messages = $this->conn->sort($mailbox, $sort_field, $criteria, false, $charset);

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



More information about the Svn mailing list