Fix preview generation.
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 29 May 2009 04:05:42 +0000 (22:05 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 29 May 2009 04:34:59 +0000 (22:34 -0600)
Was downloading bodytext for unseen messages regardless of preview
preference.

imp/lib/Mailbox.php

index 91f29f5..2923252 100644 (file)
@@ -224,8 +224,9 @@ class IMP_Mailbox
                     }
 
                     if (($options['preview'] === 2) ||
-                        !$GLOBALS['prefs']->getValue('preview_show_unread') ||
-                        !in_array('\\seen', $v['flags'])) {
+                        (($options['preview'] === 1) &&
+                         (!$GLOBALS['prefs']->getValue('preview_show_unread') ||
+                          !in_array('\\seen', $v['flags'])))) {
                         if (empty($preview_info[$k])) {
                             try {
                                 $imp_contents = IMP_Contents::singleton($k . IMP::IDX_SEP . $mbox);