From 189a0ae4dcd965c9ea1ed3d203cfd5dd28922046 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 18 Aug 2011 05:30:28 -0400
Subject: [PATCH] - Unsubscribe from non-existing folders always (on listing), not only in Settings/Folders UI

---
 program/steps/settings/folders.inc |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/program/steps/settings/folders.inc b/program/steps/settings/folders.inc
index eea5806..ccf8eeb 100644
--- a/program/steps/settings/folders.inc
+++ b/program/steps/settings/folders.inc
@@ -278,9 +278,6 @@
         $display_folder = str_repeat('&nbsp;&nbsp;&nbsp;&nbsp;', $folder['level'])
             . Q($protected ? rcmail_localize_foldername($folder['id']) : $folder['name']);
 
-        if ($sub_key !== false)
-            unset($a_subscribed[$sub_key]);
-
         if ($folder['virtual']) {
             $classes[] = 'virtual';
         }
@@ -327,11 +324,6 @@
 
         $a_js_folders['rcmrow'.$idx] = array($folder_utf8,
             Q($display_folder), $protected || $folder['virtual']);
-    }
-
-    // Unsubscribe from non-existing folders
-    foreach ($a_subscribed as $folder) {
-        $IMAP->unsubscribe($folder);
     }
 
     $RCMAIL->plugins->exec_hook('folders_list', array('table' => $table));

--
Gitblit v1.9.1