Pass spam mailbox indicator as metadata
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 30 Sep 2010 21:41:31 +0000 (15:41 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 30 Sep 2010 22:28:03 +0000 (16:28 -0600)
imp/js/dimpbase.js
imp/lib/Views/ListMessages.php
imp/templates/dimp/javascript_defs_dimp.php

index eeafbeb..4e3185a 100644 (file)
@@ -609,7 +609,7 @@ var DimpBase = {
                     }
                 }
 
-                if (this.folder == DIMP.conf.spam_mbox) {
+                if (this.viewport.getMetaData('spam')) {
                     if (!DIMP.conf.spam_spammbox) {
                         spam = 'hide';
                     }
index 648b890..aa2d80c 100644 (file)
@@ -142,6 +142,8 @@ class IMP_Views_ListMessages
                 if ($mbox == IMP::folderPref($GLOBALS['prefs']->getValue('drafts_folder'), true)) {
                     $md->drafts = 1;
                 }
+            } elseif ($mbox == IMP::folderPref($GLOBALS['prefs']->getValue('spam_folder'), true)) {
+                $md->spam = 1;
             }
             if ($is_search) {
                 $md->search = 1;
index e3ed39b..cfda7b7 100644 (file)
@@ -120,7 +120,6 @@ $code['conf'] = array_filter(array(
             'v' => Horde_Imap_Client::SORT_SIZE
         )
     ),
-    'spam_mbox' => IMP::folderPref($GLOBALS['prefs']->getValue('spam_folder'), true),
     'spam_spammbox' => intval(!empty($GLOBALS['conf']['spam']['spamfolder'])),
     'splitbar_pos' => intval($GLOBALS['prefs']->getValue('dimp_splitbar')),