From 092bc0bca51ce7830f413c600789ddc89981da67 Mon Sep 17 00:00:00 2001 From: svncommit Date: Mon, 15 Oct 2007 07:55:29 +0000 Subject: Re-subscribe folders after renaming parent folder. --- program/include/rcube_imap.inc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'program/include') diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc index 41cc1cca5..3fe5b1c11 100644 --- a/program/include/rcube_imap.inc +++ b/program/include/rcube_imap.inc @@ -1701,6 +1701,14 @@ class rcube_imap if (strlen($abs_name)) $result = iil_C_RenameFolder($this->conn, $mailbox, $abs_name); + // check if mailbox children are subscribed + foreach ($a_subscribed as $c_subscribed) + if (preg_match('/^'.preg_quote($mailbox.$this->delimiter).'/', $c_subscribed)) + { + iil_C_UnSubscribe($this->conn, $c_subscribed); + iil_C_Subscribe($this->conn, preg_replace('/^'.preg_quote($mailbox).'/', $abs_name, $c_subscribed)); + } + // clear cache if ($result) { -- cgit v1.2.3