Bug #9069: Fix toggling nav_poll in DIMP
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 2 Jun 2010 03:56:32 +0000 (21:56 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 2 Jun 2010 03:56:32 +0000 (21:56 -0600)
imp/js/dimpbase.js
imp/lib/Ajax/Application.php

index ee8a8c8..e69dd22 100644 (file)
@@ -2885,7 +2885,7 @@ var DimpBase = {
         }
 
         if (!r.add) {
-            fid.store('u', null);
+            fid.store('u', undefined);
             this.updateUnseenStatus(f, 0);
         }
     },
index 9fcb256..4b49b82 100644 (file)
@@ -420,15 +420,15 @@ class IMP_Ajax_Application extends Horde_Ajax_Application_Base
         $result->mbox = $this->_vars->mbox;
 
         if ($this->_vars->add) {
-            $imptree->addPollList($this->_vars->view);
+            $imptree->addPollList($this->_vars->mbox);
             try {
-                if ($info = $GLOBALS['injector']->getInstance('IMP_Imap')->getOb()->status($this->_vars->view, Horde_Imap_Client::STATUS_UNSEEN)) {
-                    $result->poll = array($this->_vars->view => intval($info['unseen']));
+                if ($info = $GLOBALS['injector']->getInstance('IMP_Imap')->getOb()->status($this->_vars->mbox, Horde_Imap_Client::STATUS_UNSEEN)) {
+                    $result->poll = array($this->_vars->mbox => intval($info['unseen']));
                 }
             } catch (Horde_Imap_Client_Exception $e) {}
             $GLOBALS['notification']->push(sprintf(_("\"%s\" mailbox now polled for new mail."), $display_folder), 'horde.success');
         } else {
-            $imptree->removePollList($this->_vars->view);
+            $imptree->removePollList($this->_vars->mbox);
             $GLOBALS['notification']->push(sprintf(_("\"%s\" mailbox no longer polled for new mail."), $display_folder), 'horde.success');
         }