From fe8f12b84eee9bb2af0f171072ad24bdd6d5ba92 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 17 Apr 2009 18:23:49 -0600 Subject: [PATCH] Fix some issues with updating unseen count when flagging all new --- imp/ajax.php | 8 +++++--- imp/js/src/DimpBase.js | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/imp/ajax.php b/imp/ajax.php index 47c160da1..59ce90c81 100644 --- a/imp/ajax.php +++ b/imp/ajax.php @@ -122,7 +122,7 @@ function _getPollInformation($mbox) $elt = $imptree->get($mbox); if ($imptree->isPolled($elt)) { $info = $imptree->getElementInfo($mbox); - return array($mbox => isset($info['unseen']) ? $info['unseen'] : 0); + return array($mbox => isset($info['unseen']) ? intval($info['unseen']) : 0); } return array(); } @@ -277,11 +277,13 @@ case 'FlagAll': $result = new stdClass; $result->flags = $flags; $result->mbox = $mbox; - $result->set = intval($set); + if ($set) { + $result->set = 1; + } $poll = _getPollInformation($mbox); if (!empty($poll)) { - $result->poll = array($mbox => $poll[$mbox]['u']); + $result->poll = array($mbox => $poll[$mbox]); } } break; diff --git a/imp/js/src/DimpBase.js b/imp/js/src/DimpBase.js index 92697c425..0ae1cf043 100644 --- a/imp/js/src/DimpBase.js +++ b/imp/js/src/DimpBase.js @@ -1783,7 +1783,7 @@ var DimpBase = { this.updateFlag(this.viewport.createSelection('rownum', $A($R(1, this.viewport.getMetaData('total_rows')))), f, r.response.set); }, this); } - this.setFolderLabel(r.response.mbox, r.response.u); + this._pollCallback(r); } }, -- 2.11.0