break;
case 'poll_folder':
+ if (!empty($folder_list)) {
+ $imaptree->addPollList($folder_list);
+ }
+ break;
+
case 'nopoll_folder':
if (!empty($folder_list)) {
- ($actionID == 'poll_folder') ? $imaptree->addPollList($folder_list) : $imaptree->removePollList($folder_list);
- $imp_search->createVINBOXFolder();
+ $imaptree->removePollList($folder_list);
}
break;
return;
}
+ $changed = false;
+
$imp_folder = IMP_Folder::singleton();
$this->getPollList();
foreach ($id as $val) {
if (!$this->isSubscribed($this->_tree[$val])) {
$imp_folder->subscribe(array($val));
}
- $this->_poll[$val] = true;
$this->_setPolled($this->_tree[$val], true);
+ if (empty($this->_poll[$val])) {
+ $this->_poll[$val] = true;
+ $changed = true;
+ }
+ }
+
+ if ($changed) {
+ $GLOBALS['prefs']->setValue('nav_poll', serialize($this->_poll));
+ $GLOBALS['imp_search']->createVINBOXFolder();
+ $this->_changed = true;
}
- $GLOBALS['prefs']->setValue('nav_poll', serialize($this->_poll));
- $this->_changed = true;
}
/**
if ($removed) {
$GLOBALS['prefs']->setValue('nav_poll', serialize($this->_poll));
+ $GLOBALS['imp_search']->createVINBOXFolder();
$this->_changed = true;
}
}