Prevent endless recursive sent subfolder names - see: http://thread.gmane.org/gmane...
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 29 Aug 2012 17:03:09 +0000 (17:03 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 29 Aug 2012 17:03:09 +0000 (17:03 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14340 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/sent_subfolders/functions.php

index 783d263d922d0254a56a3e735a9c1a592760d5d5..4cf6e5605960d8229964283ca05faf6ce30f41e1 100644 (file)
@@ -131,6 +131,10 @@ function save_option_sent_subfolders_setting($option) {
     } else {
         setPref($data_dir, $username, 'use_sent_subfolders', SMPREF_ON);
         setPref($data_dir, $username, 'move_to_sent', SMPREF_ON);
+        $check_sent_subfolders_base = getPref($data_dir, $username, 'sent_subfolders_base', '');
+        if ($check_sent_subfolders_base === '') {
+            setPref($data_dir, $username, 'sent_subfolders_base', $sent_subfolders_base);
+        }
     }
 
     /* Now just save the option as normal. */