From a3b85d7b8560cdc1057fcaffa3acbd247b4b5b7a Mon Sep 17 00:00:00 2001
From: Thomas B. <thomas@roundcube.net>
Date: Mon, 07 Oct 2013 13:19:03 -0400
Subject: [PATCH] Merge pull request #133 from cwickert/release-0.9-canned-responses

---
 program/steps/mail/getunread.inc |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/program/steps/mail/getunread.inc b/program/steps/mail/getunread.inc
index 39880b9..fb7e802 100644
--- a/program/steps/mail/getunread.inc
+++ b/program/steps/mail/getunread.inc
@@ -6,7 +6,10 @@
  |                                                                       |
  | This file is part of the Roundcube Webmail client                     |
  | Copyright (C) 2005-2009, The Roundcube Dev Team                       |
- | Licensed under the GNU GPL                                            |
+ |                                                                       |
+ | Licensed under the GNU General Public License version 3 or            |
+ | any later version with exceptions for skins & plugins.                |
+ | See the README file for a full license statement.                     |
  |                                                                       |
  | PURPOSE:                                                              |
  |   Check all mailboxes for unread messages and update GUI              |
@@ -14,16 +17,13 @@
  +-----------------------------------------------------------------------+
  | Author: Thomas Bruederli <roundcube@gmail.com>                        |
  +-----------------------------------------------------------------------+
-
- $Id$
-
 */
 
-$a_folders = $RCMAIL->imap->list_mailboxes('', '*', 'mail');
+$a_folders = $RCMAIL->storage->list_folders_subscribed('', '*', 'mail');
 
 if (!empty($a_folders))
 {
-  $current = $RCMAIL->imap->get_mailbox_name();
+  $current = $RCMAIL->storage->get_folder();
   $inbox = ($current == 'INBOX');
   $check_all = (bool)$RCMAIL->config->get('check_all_folders');
 
@@ -33,7 +33,7 @@
     if (!$check_all && $unseen_old !== null && $mbox_row != $current)
       $unseen = $unseen_old;
     else
-      $unseen = $RCMAIL->imap->messagecount($mbox_row, 'UNSEEN', $unseen_old === null);
+      $unseen = $RCMAIL->storage->count($mbox_row, 'UNSEEN', $unseen_old === null);
 
     if ($unseen || $unseen_old === null) {
       $OUTPUT->command('set_unread_count', $mbox_row, $unseen, $inbox && $mbox_row == 'INBOX');

--
Gitblit v1.9.1