Fix threading when split across pages.
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 9 Dec 2008 07:18:59 +0000 (00:18 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 9 Dec 2008 07:18:59 +0000 (00:18 -0700)
imp/lib/IMAP/Thread.php

index 14e73cf..90a82ca 100644 (file)
@@ -64,7 +64,11 @@ class IMP_IMAP_Thread
 
         /* If starting in the middle of a thread, the threadLevel tree needs
          * to be built from the base of the current thread. */
+        $first = reset($indices);
         foreach ($t->getThread(reset($indices)) as $val) {
+            if ($first == $val) {
+                break;
+            }
             $thread_level[$t->getThreadIndent($val)] = $t->lastInLevel($val);
         }