- /* Update sent_folder setting. */
- //setPref($data_dir, $username, 'sent_folder', $sent_subfolder);
- //setPref($data_dir, $username, 'move_to_sent', SMPREF_ON);
+ /* Update sent_folder setting in prefs only if the base
+ subfolders setting is not the same as the normal sent
+ folder... otherwise, it is quite misleading to the user.
+ If the sent folder is the same as the subfolders base, it's
+ OK to leave the sent folder as is.
+ The sent_folder setting itself needs to be the actual
+ subfolder (not the base) for proper functionality */
+ if ($sent_subfolders_base != $sent_folder) {
+ setPref($data_dir, $username, 'sent_folder', $sent_subfolders_base);
+ setPref($data_dir, $username, 'move_to_sent', SMPREF_ON);
+ setPref($data_dir, $username, 'translate_special_folders', SMPREF_OFF);
+ }