X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fsent_subfolders%2Ffunctions.php;h=de8c9f8ead491ad49f8eb9ae14adac2f7767d462;hp=456b2830c071bf00df74fb5d2b99eadad9087f87;hb=e7d5ff29db69101e42cd491d2fa42d4f83cd35a4;hpb=30460a05016c7e066ad7b28df7788539e4054a99 diff --git a/plugins/sent_subfolders/functions.php b/plugins/sent_subfolders/functions.php index 456b2830..de8c9f8e 100644 --- a/plugins/sent_subfolders/functions.php +++ b/plugins/sent_subfolders/functions.php @@ -5,7 +5,7 @@ * * This is a standard SquirrelMail 1.2 API for plugins. * - * @copyright 1999-2009 The SquirrelMail Project Team + * @copyright 1999-2017 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package plugins @@ -50,10 +50,10 @@ function sent_subfolders_check_handleAsSent_do($mailbox) { function sent_subfolders_optpage_loadhook_folders_do() { global $data_dir, $username, $optpage_data, $imapServerAddress, - $imapPort, $show_contain_subfolders_option, $sent_folder; + $imapPort, $imap_stream_options, $show_contain_subfolders_option, $sent_folder; /* Get some imap data we need later. */ - $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0); + $imapConnection = sqimap_login($username, false, $imapServerAddress, $imapPort, 0, $imap_stream_options); $boxes = sqimap_mailbox_list($imapConnection); sqimap_logout($imapConnection); @@ -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. */ @@ -157,7 +161,7 @@ function save_option_sent_subfolders_base($option) { function sent_subfolders_update_sentfolder_do() { global $sent_folder, $username, $data_dir, $imapServerAddress, $imapPort, - $move_to_sent; + $imap_stream_options, $move_to_sent; sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); @@ -214,7 +218,7 @@ function sent_subfolders_update_sentfolder_do() { /* Auto-create folders, if they do not yet exist. */ if ($sent_subfolder != 'none') { /* Create the imap connection. */ - $ic = sqimap_login($username, false, $imapServerAddress, $imapPort, 10); + $ic = sqimap_login($username, false, $imapServerAddress, $imapPort, 10, $imap_stream_options); $boxes = false; /**