Fix poll information on mimp folders page
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 19 Aug 2010 22:13:02 +0000 (16:13 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 20 Aug 2010 16:15:12 +0000 (10:15 -0600)
imp/folders-mimp.php

index 0047624..fd6dadf 100644 (file)
@@ -51,12 +51,14 @@ $t = $injector->createInstance('Horde_Template');
 /* Start iterating through the list of mailboxes, displaying them. */
 $rows = array();
 foreach ($imptree->folderList($mask) as $val) {
-    $poll_info = $val->poll_info;
+    $poll_info = $val->polled
+        ? $val->poll_info
+        : null;
     $rows[] = array(
         'level' => str_repeat('&nbsp;', $val->level * 2),
         'label' => htmlspecialchars(Horde_String::abbreviate($val->label, 30 - ($val->level * 2))),
         'link' => ($val->container ? null : IMP::generateIMPUrl('mailbox-mimp.php', $val->value)),
-        'msgs' => (isset($poll_info->msgs) ? ($poll_info->unseen . '/' . $poll_info->msgs) : null)
+        'msgs' => ($poll_info ? ($poll_info->unseen . '/' . $poll_info->msgs) : null)
     );
 }
 $t->set('rows', $rows);