summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorsvncommit <devs@roundcube.net>2007-10-15 07:55:29 +0000
committersvncommit <devs@roundcube.net>2007-10-15 07:55:29 +0000
commit092bc0bca51ce7830f413c600789ddc89981da67 (patch)
treea33588e0ab7cebb6c5ef13fc8589911625c6b03f /program
parent480f5d9246fc745e3d8fb36196f56b2e187290c4 (diff)
Re-subscribe folders after renaming parent folder.
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_imap.inc8
1 files changed, 8 insertions, 0 deletions
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)
{