[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kolab-commits
Subject:    Branch 'roundcubemail-plugins-kolab-3.1' - plugins/libkolab
From:       Thomas_BrĂ¼derli <bruederli () kolabsys ! com>
Date:       2013-09-26 8:21:19
Message-ID: 20130926082119.74C443EF1B8 () app01 ! kolabsys ! com
[Download RAW message or body]

 plugins/libkolab/lib/kolab_storage.php |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit cdb276c83d1c64da54bd0ef40ce2656af478c825
Author: Thomas Bruederli <bruederli@kolabsys.com>
Date:   Thu Sep 26 10:20:25 2013 +0200

    Keep active state when renaming a folder (#2268)

diff --git a/plugins/libkolab/lib/kolab_storage.php b/plugins/libkolab/lib/kolab_storage.php
index e5d6438..ebfddcb 100644
--- a/plugins/libkolab/lib/kolab_storage.php
+++ b/plugins/libkolab/lib/kolab_storage.php
@@ -276,9 +276,16 @@ class kolab_storage
     {
         self::setup();
 
+        $active = self::folder_is_active($oldname);
         $success = self::$imap->rename_folder($oldname, $newname);
         self::$last_error = self::$imap->get_error_str();
 
+        // pass active state to new folder name
+        if ($success && $active) {
+            self::set_state($oldnam, false);
+            self::set_state($newname, true);
+        }
+
         return $success;
     }
 


_______________________________________________
commits mailing list
commits@lists.kolab.org
https://lists.kolab.org/mailman/listinfo/commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic